Zsh Mailing List Archive
Messages sorted by:
Re: bug in single_command
- X-seq: zsh-workers 26551
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxxxxx>
- Subject: Re: bug in single_command
- Date: Wed, 11 Feb 2009 10:13:06 -0800
- In-reply-to: <2d460de70902110952y6fb7e609u6c5693694e5bec80@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <2d460de70902110952y6fb7e609u6c5693694e5bec80@xxxxxxxxxxxxxx>
On Feb 11, 6:52pm, Richard Hartmann wrote:
} Quoting Doc/Zsh/options.yo for single_command:
} The value of this option cannot be changed anywhere other than the
} command line.
I suggest changing "the command line" here to something like "in the
flags supplied at invocation of the shell" to match terminology that
is used elsewhere, e.g., the manual section "Invocation".
} My personal interpretation is that I can
} setopt single_command
} which is obviously not correct.
It's true that "the command line" used elsewhere in the manual often
refers to the equivalent of the ZLE input buffer. On the other hand,
it seems so obvious that "setopt single_command" would cause the shell
to immediately exit (after all, it has now executed a single command!)
that I hardly believe thsi is a source of significant confusion.
A better question might be why these options are not mentioned in the
"Invocation" section, since that's the only context in which they make
sense, rather than being relegated to the "Single Letter Options".
} Also, wouldn't it make sense to move errors into dosetopt() so the error
} messages could be more explicit about _why_ a setopt went wrong?
Without looking, I'd suspect that the reason is that dosetopt() may at
times be called from a context where emitting an error message is not
appropriate. In general it's bad programming to spew to the standard
error stream at too low a level because it takes control away from the
Messages sorted by: