$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.
Links
Examples
- Print the available commands
- Output:
1declare commands1commands=( [virt-login-shell]=/usr/bin/virt-login-shell [yacc]=/usr/bin/yacc )
BashSupport Pro is a Zsh IDE with support for $commands – try it now!