mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-28 04:03:39 +08:00
d282bc4625
Rework for Doxygen >1.8. Moved large parts of the documentation to a simplified format, making use of Markdown enhancements and fixing bad long options.
23 lines
1.0 KiB
Plaintext
23 lines
1.0 KiB
Plaintext
\section command command - run a program
|
|
|
|
\subsection command-synopsis Synopsis
|
|
<tt>command [OPTIONS] COMMANDNAME [ARGS...]</tt>
|
|
|
|
\subsection command-description Description
|
|
|
|
`command` forces the shell to execute the program `COMMANDNAME` and ignore any functions or builtins with the same name.
|
|
|
|
The following options are available:
|
|
- \c -h or \c --help prints help and then exits.
|
|
- \c -s or \c --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 <tt>$PATH</tt>.
|
|
|
|
With the \c -s option, \c 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.
|
|
|
|
For basic compatibility with POSIX <tt>command</tt>, the \c -v flag is recognized as an alias for <tt>-s</tt>.
|
|
|
|
\subsection command-example Examples
|
|
|
|
<tt>command ls</tt> causes fish to execute the \c ls program, even if an 'ls' function exists.
|
|
|
|
<tt>command -s ls</tt> returns the path to the \c ls program.
|