tldr/pages/common/type.md

22 lines
588 B
Markdown
Raw Normal View History

2019-02-18 08:56:09 +00:00
# type
> Display the type of command the shell will execute.
2024-04-28 10:28:50 +01:00
> Note: all examples are not POSIX compliant.
> More information: <https://manned.org/type>.
2019-02-18 08:56:09 +00:00
- Display the type of a command:
2019-02-18 08:56:09 +00:00
`type {{command}}`
2024-04-28 10:28:50 +01:00
- Display all locations containing the specified executable (works only in Bash/fish/Zsh shells):
2019-02-18 08:56:09 +00:00
`type -a {{command}}`
2024-04-28 10:28:50 +01:00
- Display the name of the disk file that would be executed (works only in Bash/fish/Zsh shells):
2019-02-18 08:56:09 +00:00
`type -p {{command}}`
2024-04-28 10:28:50 +01:00
- Display the type of a specific command, alias/keyword/function/builtin/file (works only in Bash/fish shells):
`type -t {{command}}`