${name:c}
: Resolve Command Name
Resolves a command name into an absolute paths by searching in $PATH
.
This does only work for simple names like command
, not for relative paths like dir/command
.
Links
Examples
- Lookup absolute path of a command
- Output:
1 2 3 4
known="vim" echo $known:c unknown="not-there" echo $unknown:c
1 2
/usr/bin/vim not-there
BashSupport Pro 是一款支持 c** 的 **Zsh 集成开发环境 - 立即试用!