Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

type: add example #12668

Merged
merged 8 commits into from Apr 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 7 additions & 2 deletions pages/common/type.md
@@ -1,16 +1,21 @@
# type

> Display the type of command the shell will execute.
> Note: all examples are not POSIX compliant.
> More information: <https://manned.org/type>.

- Display the type of a command:

`type {{command}}`

- Display all locations containing the specified executable:
- Display all locations containing the specified executable (works only in Bash/fish/Zsh shells):

`type -a {{command}}`

- Display the name of the disk file that would be executed:
- Display the name of the disk file that would be executed (works only in Bash/fish/Zsh shells):

`type -p {{command}}`

- Display the type of a specific command, alias/keyword/function/builtin/file (works only in Bash/fish shells):

`type -t {{command}}`