Zsh Mailing List Archive
Messages sorted by:
Re: Unsetting a variable that was not previously set
- X-seq: zsh-users 6015
- From: Vincent Lefevre <vincent@xxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Unsetting a variable that was not previously set
- Date: Fri, 4 Apr 2003 22:41:25 +0200
- In-reply-to: <18642.1049472589@xxxxxxx>
- Mail-followup-to: zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20030404154938.GE16102@xxxxxxxxxxxxxx> <18642.1049472589@xxxxxxx>
On Fri, Apr 04, 2003 at 17:09:49 +0100, Peter Stephenson wrote:
> I think you're probably right, but it's not completely clear. The page
> you quote explicitly says:
> EXIT STATUS
> All name operands were successfully unset.
> At least one name could not be unset.
> Now, if it doesn't exist, it can't be unset,
I don't think that a variable needs to exist in order to be unset.
I think that 'unset' is just a special status (or "value") for the
variable (a bit like 'undef' in Perl). So, we have the following
> but I think by `unset' they mean `rendered such that it is not set
> whether or not it was before', which is your interpretation.
and I think that this is the goal of the following sentence to make
things clear about this problem:
> > "Unsetting a variable or function that was not previously set shall
> > not be considered an error and does not cause the shell to abort."
> It doesn't cause the shell to abort currently. The terminology in the
> introduction does suggest `error' is more or less synonymous with
> `non-zero return code', but I can find no normative indication of
> whether this applies to the language used for the special builtins.
I could only find
Under "EXIT STATUS": "Usually, utilities return zero for successful
completion and values greater than zero for various error conditions."
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.org/> - 100%
validated (X)HTML - Acorn Risc PC, Yellow Pig 17, Championnat International
des Jeux Mathématiques et Logiques, TETRHEX, etc.
Work: CR INRIA - computer arithmetic / SPACES project at LORIA
Messages sorted by: