type - indicate how a command would be interpreted¶
type [OPTIONS] NAME [NAME ...]
With no options,
type indicates how each
NAME would be interpreted if used as a command name.
The following options are available:
--allprints all of possible definitions of the specified names.
--shortsuppresses function expansion when used with no options or with
--no-functionssuppresses function and builtin lookup.
NAMEis a shell function, builtin, or disk file, respectively.
--pathprints the path to
NAMEresolves to an executable file in $PATH, the path to the script containing the definition of the function
NAMEresolves to a function loaded from a file on disk (i.e. not interactively defined at the prompt), or nothing otherwise.
--force-pathreturns the path to the executable file
NAMEis found in
$PATH, or nothing otherwise.
--force-pathexplicitly resolves only the path to executable files in
$PATH, regardless of whether
$NAMEis shadowed by a function or builtin with the same name.
--querysuppresses all output; this is useful when testing the exit status. For compatibility with old fish versions this is also
-P flags (and their long flag aliases) are mutually exclusive. Only one can be specified at a time.
>_ type fg fg is a builtin