TYPE(1) fish-shell TYPE(1)

# [NAME](#NAME)

type - locate a command and describe its type

# [SYNOPSIS](#SYNOPSIS)

```
type [OPTIONS] NAME [...]
```

# [DESCRIPTION](#DESCRIPTION)

NOTE: This page documents the fish builtin **type**. To see the documentation on any non-fish versions, use **command man type**.

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**](#a)

Prints all of possible definitions of the specified names.

[**-s** or **--short**](#s)

Don't print function definitions when used with no options or with **-a**/**--all**.

[**-f** or **--no-functions**](#f)

Suppresses function lookup.

[**-t** or **--type**](#t)

Prints **function**, **builtin**, or **file** if *NAME* is a shell function, builtin, or disk file, respectively.

[**-p** or **--path**](#p)

Prints the path to *NAME* if *NAME* resolves to an executable file in **PATH** &lt;#envvar-PATH&gt;, the path to the script containing the definition of the function *NAME* if *NAME* resolves to a function loaded from a file on disk (i.e. not interactively defined at the prompt), or nothing otherwise.

[**-P** or **--force-path**](#P)

Returns the path to the executable file *NAME*, presuming *NAME* is found in the **PATH** &lt;#envvar-PATH&gt; environment variable, or nothing otherwise. **--force-path** explicitly resolves only the path to executable files in **PATH** &lt;#envvar-PATH&gt;, regardless of whether *NAME* is shadowed by a function or builtin with the same name.

[**-q** or **--query**](#q)

Suppresses all output; this is useful when testing the exit status. For compatibility with old fish versions this is also **--quiet**.

[**--color** *WHEN*](#color)

Controls when to use syntax highlighting colors when printing function definitions. *WHEN* can be **auto** (the default, colorize if the output is a terminal &lt;&gt;), **always**, or **never**.

[**-h** or **--help**](#h)

Displays help about using this command.

The **-q**, **-p**, **-t** and **-P** flags (and their long flag aliases) are mutually exclusive. Only one can be specified at a time.

**type** returns 0 if at least one entry was found, 1 otherwise, and 2 for invalid options or option combinations.

# [EXAMPLE](#EXAMPLE)

```
>_ type fg
fg is a builtin
```

# [Copyright](#Copyright)

fish-shell developers

October 12, 2026 4.9

---

Document: type(1) from fish 4.9.3-r2 (Chainguard OS)
Source: https://github.com/fish-shell/fish-shell
