mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-25 20:41:15 -03:00
Update command.rst
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user