From 134df43067cf8d3e98fce4fa4026fcf284884ed3 Mon Sep 17 00:00:00 2001 From: Fazle Arefin Date: Sun, 28 Apr 2024 19:28:50 +1000 Subject: [PATCH] type: add example (#12668) --- pages/common/type.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pages/common/type.md b/pages/common/type.md index a692c4296..104bcccf4 100644 --- a/pages/common/type.md +++ b/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: . - 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}}`