${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.

Examples

Lookup absolute path of a command
1
2
3
4
known="vim"
echo $known:c
unknown="not-there"
echo $unknown:c
Output:
1
2
/usr/bin/vim
not-there
BashSupport Pro 是一款支持 c** 的 **Zsh 集成开发环境 - 立即试用
© 2020–2025 Joachim Ansorg
声明
隐私政策
许可条款