mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-22 03:51:15 -03:00
Merge branch 'make_type_better' of github.com:kballard/fish-shell into kballard-make_type_better
This commit is contained in:
@@ -1,12 +1,22 @@
|
||||
\section command command - run a program
|
||||
|
||||
\subsection command-synopsis Synopsis
|
||||
<tt>command COMMANDNAME [OPTIONS...]</tt>
|
||||
<tt>command [OPTIONS] COMMANDNAME [ARGS...]</tt>
|
||||
|
||||
\subsection command-description Description
|
||||
|
||||
\c command forces the shell to execute the program \c COMMANDNAME and ignore any functions or builtins with the same name.
|
||||
|
||||
\subsection command-example Example
|
||||
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.
|
||||
|
||||
@@ -19,11 +19,17 @@ The following options are available:
|
||||
- <code>-u</code> or <code>--unexport</code> prevents the variables from being exported to child processes (default behaviour).
|
||||
- <code>-U</code> or <code>--universal</code> causes the specified shell variable to be made universal.
|
||||
- <code>-x</code> or <code>--export</code> exports the variables to child processes.
|
||||
- <code>-a</code> or <code>--array</code> stores the result as an array.
|
||||
|
||||
\c read reads a single line of input from stdin, breaks it into tokens
|
||||
based on the <tt>IFS</tt> shell variable, and then assigns one
|
||||
token to each variable specified in <tt>VARIABLES</tt>. If there are more
|
||||
tokens than variables, the complete remainder is assigned to the last variable.
|
||||
As a special case, if \c IFS is set to the empty string, each character of the
|
||||
input is considered a separate token.
|
||||
|
||||
If \c -a or \c --array is provided, only one variable name is allowed and the
|
||||
tokens are stored as an array in this variable.
|
||||
|
||||
See the documentation for \c set for more details on the scoping rules for
|
||||
variables.
|
||||
|
||||
@@ -12,9 +12,10 @@ The following options are available:
|
||||
- \c -h or \c --help prints help and then exits.
|
||||
- \c -a or \c --all prints all of possible definitions of the specified names.
|
||||
- \c -f or \c --no-functions suppresses function and builtin lookup.
|
||||
- \c -t or \c --type prints <tt>keyword</tt>, <tt>function</tt>, <tt>builtin</tt>, or <tt>file</tt> if \c NAME is a shell reserved word, function, builtin, or disk file, respectively.
|
||||
- \c -t or \c --type prints <tt>function</tt>, <tt>builtin</tt>, or <tt>file</tt> if \c NAME is a shell function, builtin, or disk file, respectively.
|
||||
- \c -p or \c --path returns the name of the disk file that would be executed, or nothing if 'type -t name' would not return 'file'.
|
||||
- \c -P or \c --force-path returns the name of the disk file that would be executed, or nothing no file with the specified name could be found in the <tt>$PATH</tt>.
|
||||
- \c -P or \c --force-path 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>.
|
||||
- \c -q or \c --quiet suppresses all output; this is useful when testing the exit status.
|
||||
|
||||
\c type sets the exit status to 0 if the specified command was found,
|
||||
and 1 if it could not be found.
|
||||
|
||||
Reference in New Issue
Block a user