diff options
author | Daniel Shahaf <d.s@daniel.shahaf.name> | 2017-11-24 22:09:41 +0000 |
---|---|---|
committer | Daniel Shahaf <d.s@daniel.shahaf.name> | 2017-11-24 22:10:27 +0000 |
commit | 77a39b57bf467812b9219ae6a84f2f71e6a50065 (patch) | |
tree | 99131cf303d38b18151623e4e4cdab2044005ba1 /Doc/Zsh | |
parent | 487489c5225aee671077bc0ea257e5c460e675ef (diff) | |
download | zsh-77a39b57bf467812b9219ae6a84f2f71e6a50065.tar.gz zsh-77a39b57bf467812b9219ae6a84f2f71e6a50065.tar.xz zsh-77a39b57bf467812b9219ae6a84f2f71e6a50065.zip |
42031 + 42048: Make [[ -o invalidoption ]] a normal(ish) false value, rather than a syntax error.
Diffstat (limited to 'Doc/Zsh')
-rw-r--r-- | Doc/Zsh/cond.yo | 4 | ||||
-rw-r--r-- | Doc/Zsh/options.yo | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/Doc/Zsh/cond.yo b/Doc/Zsh/cond.yo index e08fc0d36..4ca132a26 100644 --- a/Doc/Zsh/cond.yo +++ b/Doc/Zsh/cond.yo @@ -45,6 +45,10 @@ item(tt(-o) var(option))( true if option named var(option) is on. var(option) may be a single character, in which case it is a single letter option name. (See noderef(Specifying Options).) + +When no option named var(option) exists, and the tt(POSIX_BUILTINS) option +hasn't been set, return 3 with a warning. If that option is set, return 1 +with no warning. ) item(tt(-p) var(file))( true if var(file) exists and is a FIFO special file (named pipe). diff --git a/Doc/Zsh/options.yo b/Doc/Zsh/options.yo index 28155d796..d043cf398 100644 --- a/Doc/Zsh/options.yo +++ b/Doc/Zsh/options.yo @@ -2169,6 +2169,9 @@ command found in the path. Furthermore, the tt(getopts) builtin behaves in a POSIX-compatible fashion in that the associated variable tt(OPTIND) is not made local to functions. + +Moreover, the warning and special exit code from +tt([[ -o )var(non_existent_option)tt( ]]) are suppressed. ) pindex(POSIX_IDENTIFIERS) pindex(NO_POSIX_IDENTIFIERS) |