$commands  –  Command Hash Table

$commands provides the command hash table. It’s a mapping of command name to the path of the executable, which would be executed.

Setting and unsetting elements of the array works in the same way as the hash builtin command.

Examples

Print the available commands
1
declare commands
Output:
1
commands=( [virt-login-shell]=/usr/bin/virt-login-shell [yacc]=/usr/bin/yacc )
BashSupport Pro is a Zsh IDE with support for $commandstry it now!
© 2020–2024 Joachim Ansorg
Imprint
Privacy Policy
Legal