mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 21:33:09 +00:00
Update command.rst
This commit is contained in:
parent
f464bbebfe
commit
5e96f817a6
1 changed files with 3 additions and 3 deletions
|
@ -26,11 +26,11 @@ The following options are available:
|
|||
**-v** (or **-s** or **--search**)
|
||||
Prints the external command that would be executed, or prints nothing if no file with the specified name could be found in :envvar:`PATH`.
|
||||
|
||||
With the **-v** 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 **--quiet** option prevents any paths from being printed, like ``type -q``.
|
||||
With the **-v** 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 127 if no commands could be found. **--quiet** used with **-v** prevents commands being printed, like ``type -q``.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
| ``command ls`` causes fish to execute the ``ls`` program, even if an ``ls`` function exists.
|
||||
| ``command -s ls`` returns the path to the ``ls`` program.
|
||||
| ``command ls`` executes the ``ls`` program, even if an ``ls`` function also exists.
|
||||
| ``command -s ls`` prints the path to the ``ls`` program.
|
||||
| ``command -q git; and command git log`` runs ``git log`` only if ``git`` exists.
|
||||
|
|
Loading…
Reference in a new issue