${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 ist eine Zsh IDE mit Unterstützung für $varName:c - probieren Sie es jetzt aus!
© 2020–2024 Joachim Ansorg
Impressum
Datenschutz
Rechtliches