Let command -q work

This required "-sq" to be used and errored if just "-q" was given.

Instead, if only "-q" is given, we behave just as if "-sq" was.
This commit is contained in:
Fabian Homborg
2019-02-09 12:51:55 +01:00
parent fb7a6e5f34
commit dc0746bc45
2 changed files with 5 additions and 4 deletions

View File

@@ -13,7 +13,7 @@ The following options are available:
- `-a` or `--all` returns all the external commands that are found in `$PATH` in the order they are found.
- `-q` or `--quiet`, in conjunction with `-s`, silences the output and prints nothing, setting only the exit code.
- `-q` or `--quiet`, silences the output and prints nothing, setting only the exit code. Implies `--search`.
- `-s` or `--search` returns the name of the external command that would be executed, or nothing if no file with the specified name could be found in the `$PATH`.
@@ -27,4 +27,4 @@ For basic compatibility with POSIX `command`, the `-v` flag is recognized as an
`command -s ls` returns the path to the `ls` program.
`command -sq git; and command git log` runs `git log` only if `git` exists.
`command -q git; and command git log` runs `git log` only if `git` exists.