mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-23 10:51:14 -03:00
Adds a --quiet/-q option for command -s (#3591)
devnull'ing this builtin to check presence is a common enough chore that a --quiet option which works like it does on `type` would be handy.
This commit is contained in:
@@ -13,7 +13,7 @@ The following options are available:
|
||||
|
||||
- `-s` or `--search` returns the name of the disk file that would be executed, or nothing if no file with the specified name could be found in the `$PATH`.
|
||||
|
||||
With the `-s` option, `command` treats every argument as a separate command to look up and sets the exit status to 0 if any of the specified commands were found, or 1 if no commands could be found.
|
||||
With the `-s` option, `command` treats every argument as a separate command to look up and sets the exit status to 0 if any of the specified commands were found, or 1 if no commands could be found. Additionally passing a `-q` or `--quiet` option prevents any paths from being printed, like the `type -q`, for testing only the exit status.
|
||||
|
||||
For basic compatibility with POSIX `command`, the `-v` flag is recognized as an alias for `-s`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user