mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-03 03:41:14 -03:00
set -q: Return 255 if no variable name was passed
Previously this strictly returned the number of unset variables. So if no variable was given, it would return *true*, which is highly suspect.
This commit is contained in:
@@ -59,7 +59,7 @@ The following other options are available:
|
||||
|
||||
- ``-e`` or ``--erase`` causes the specified shell variables to be erased
|
||||
|
||||
- ``-q`` or ``--query`` test if the specified variable names are defined. Does not output anything, but the builtins exit status is the number of variables specified that were not defined, or 255 if more than 255 variables are not defined.
|
||||
- ``-q`` or ``--query`` test if the specified variable names are defined. Does not output anything, but the builtins exit status is the number of variables specified that were not defined, up to a maximum of 255. If no variable was given, it also returns 255.
|
||||
|
||||
- ``-n`` or ``--names``: List only the names of all defined variables, not their value. The names are guaranteed to be sorted.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user