From: schaefer@z-code.ncd.com (Barton E. Schaefer)
To: "Richard J. Coleman" <coleman@math.gatech.edu>,
zsh-workers@math.gatech.edu
Subject: Re: why is SHINSTDIN an option?
Date: Wed, 10 Apr 1996 22:17:37 -0700 [thread overview]
Message-ID: <960410221737.ZM18723@zyrcon.z-code.com> (raw)
In-Reply-To: "Richard J. Coleman" <coleman@math.gatech.edu> "why is SHINSTDIN an option?" (Apr 11, 12:13am)
On Apr 11, 12:13am, Richard J. Coleman wrote:
} Subject: why is SHINSTDIN an option?
}
} Is there any reason for SHINSTDIN to be an option?
} is there any time where a user would want to set this himself?
I think it's an option mostly so it can be tested, rather than set.
if [[ -o shinstdin ]]
then
echo "I was run with 'zsh < somefile', so \$0 is zsh"
else
echo "I was run with 'zsh $0' or '. $0' or just as '$0'"
fi
I suppose there might be some reason to want to spoof the above by
setopt/unsetopt of shinstdin, but I can't think of one offhand.
Further, it could conceivably have other uses, particularly as a
command-line option. Consider:
#! /usr/local/bin/zsh -s
echo This does not happen.
I'd be reluctant to eliminate the option, if that's what you are
thinking about.
--
Bart Schaefer Vice President, Technology, Z-Code Software
schaefer@z-code.com Division of NCD Software Corporation
http://www.well.com/www/barts
prev parent reply other threads:[~1996-04-11 5:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-04-11 4:13 Richard J. Coleman
1996-04-11 5:10 ` Zefram
1996-04-11 5:17 ` Barton E. Schaefer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=960410221737.ZM18723@zyrcon.z-code.com \
--to=schaefer@z-code.ncd.com \
--cc=coleman@math.gatech.edu \
--cc=zsh-workers@math.gatech.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).