From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by melb.werple.net.au (8.7.5/8.7.3) with ESMTP id PAA09273 for ; Thu, 11 Apr 1996 15:28:44 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id BAA26826; Thu, 11 Apr 1996 01:17:20 -0400 (EDT) Resent-Date: Thu, 11 Apr 1996 01:17:20 -0400 (EDT) From: schaefer@z-code.ncd.com (Barton E. Schaefer) Message-Id: <960410221737.ZM18723@zyrcon.z-code.com> Date: Wed, 10 Apr 1996 22:17:37 -0700 In-Reply-To: "Richard J. Coleman" "why is SHINSTDIN an option?" (Apr 11, 12:13am) References: <199604110413.AAA24507@redwood.skiles.gatech.edu> Reply-To: schaefer@z-code.ncd.com X-Face: czU|*h"p8AX?4.I.yU.^s%TIMx|"-s,*'|#H^|e,QjE&!jL%<]:-.U/;khS%3a2BC5_d#)( mz=$$G0u9P&*N8cA~b[URf;lgKRif@#qEf[ltie#Gg0%6$b`e`k.Cgw:\qJx\\a7c(K7^3;gXW:e1@ J, zsh-workers@math.gatech.edu Subject: Re: why is SHINSTDIN an option? Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"T9iAo.0.4Z6.VN9Rn"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/920 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu 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