mirror of
https://github.com/zsh-users/zsh
synced 2024-09-29 04:35:22 +00:00
users/12305: option output not well documented
-c and SHIN_STDIN inconsistent with manual
This commit is contained in:
parent
2214e05722
commit
765f73823e
|
@ -1,3 +1,9 @@
|
|||
2007-12-12 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* users/12305: Doc/Zsh/builtins.yo, Src/init.c,
|
||||
Test/A01grammar.ztst: option output wasn't well described;
|
||||
"-c" is documented not to set SHIN_STDIN, so don't.
|
||||
|
||||
2007-12-11 Clint Adams <clint@zsh.org>
|
||||
|
||||
* unposted: Completion/Debian/Command/.distfiles: update.
|
||||
|
|
|
@ -1137,7 +1137,8 @@ sort arguments in descending order. For the meaning of the other flags, see
|
|||
ifzman(zmanref(zshoptions))\
|
||||
ifnzman(noderef(Options))\
|
||||
. Flags may be specified by name using the tt(-o) option. If no option
|
||||
name is supplied with tt(-o), the current option states are printed.
|
||||
name is supplied with tt(-o), the current option states are printed: see
|
||||
the description of tt(setopt) below for more information on the format.
|
||||
With tt(PLUS()o) they are printed in a form that can be used as input
|
||||
to the shell.
|
||||
|
||||
|
@ -1180,8 +1181,23 @@ cindex(options, setting)
|
|||
item(tt(setopt) [ {tt(PLUS())|tt(-)}var(options) | \
|
||||
{tt(PLUS())|tt(-)}tt(o) var(option_name) ] [ var(name) ... ])(
|
||||
Set the options for the shell. All options specified either
|
||||
with flags or by name are set. If no arguments are supplied,
|
||||
the names of all options currently set are printed.
|
||||
with flags or by name are set.
|
||||
|
||||
If no arguments are supplied, the names of all options currently set are
|
||||
printed. The form is chosen so as to minimize the differences from the
|
||||
default options for the current emulation (the default emulation being
|
||||
native tt(zsh), shown as tt(<Z>) in
|
||||
ifzman(zmanref(zshoptions))\
|
||||
ifnzman(noderef(Description of Options))).
|
||||
Options that are on by default for the emulation are
|
||||
shown with the prefix tt(no) only if they are off, while other options are
|
||||
shown without the prefix tt(no) and only if they are on. In addition to
|
||||
options changed from the default state by the user, any options activated
|
||||
automatically by the shell (for example, tt(SHIN_STDIN) or tt(INTERACTIVE))
|
||||
will be shown in the list. The format is further modified by the option
|
||||
tt(KSH_OPTION_PRINT), however the rationale for choosing options with
|
||||
or without the tt(no) prefix remains the same in this case.
|
||||
|
||||
If the tt(-m) flag is given the arguments are taken as patterns
|
||||
(which should be quoted to protect them from filename expansion), and all
|
||||
options with names matching these patterns are set.
|
||||
|
|
|
@ -272,7 +272,6 @@ parseargs(char **argv)
|
|||
/* -c command */
|
||||
cmd = *argv;
|
||||
opts[INTERACTIVE] &= 1;
|
||||
opts[SHINSTDIN] = 0;
|
||||
scriptname = ztrdup("zsh");
|
||||
} else if (**argv == 'o') {
|
||||
if (!*++*argv)
|
||||
|
@ -334,7 +333,7 @@ parseargs(char **argv)
|
|||
}
|
||||
while (*argv)
|
||||
zaddlinknode(paramlist, ztrdup(*argv++));
|
||||
} else
|
||||
} else if (!cmd)
|
||||
opts[SHINSTDIN] = 1;
|
||||
if(isset(SINGLECOMMAND))
|
||||
opts[INTERACTIVE] &= 1;
|
||||
|
|
|
@ -490,7 +490,7 @@
|
|||
|
||||
$ZTST_testdir/../Src/zsh -f -c "'"
|
||||
1:Parse error on inline command causes non-zero exit status
|
||||
?zsh: unmatched '
|
||||
?zsh:1: unmatched '
|
||||
|
||||
$ZTST_testdir/../Src/zsh -f NonExistentScript
|
||||
127q:Non-existent script causes exit status 127
|
||||
|
|
Loading…
Reference in a new issue