aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc_src/type.txt
blob: 7b5f7a9c298c9d52870e409cbd4bfca7daaaef68 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
\section type type - indicate how a command would be interpreted

\subsection type-synopsis Synopsis
\fish{synopsis}
type [OPTIONS] NAME [NAME ...]
\endfish

\subsection type-description Description

With no options, `type` indicates how each `NAME` would be interpreted if used as a command name.

The following options are available:

- `-a` or `--all` prints all of possible definitions of the specified names.

- `-f` or `--no-functions` suppresses function and builtin lookup.

- `-t` or `--type` prints `function`, `builtin`, or `file` if `NAME` is a shell function, builtin, or disk file, respectively.

- `-p` or `--path` returns the name of the disk file that would be executed, or nothing if `type  -t  name` would not return `file`.

- `-P` or `--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>.

- `-q` or `--quiet` suppresses all output; this is useful when testing the exit status.


\subsection type-example Example

\fish{cli-dark}
>_ type fg
\outp{fg is a builtin}
\endfish