hash - remember command paths or define named directories.
hash [-r] [utility ...] hash -d [-r] [name[=directory] ...]
hash is a POSIX regular builtin provided by Rush. Utility operands search PATH and remember the resulting command paths. Without operands, it prints remembered paths. -r clears all remembered paths before processing any operands.
In the default Rush mode, -d selects the named-directory table instead. An operand of the form name=/absolute/path defines a named directory, which may then be used as ~name or ~name/subpath. A name without a value prints that entry, and no operands print all entries. With -d, -r clears the named-directory table.
alias -d accesses the same named-directory table, and unalias -d removes entries. Named directories are a non-POSIX extension and are disabled in POSIX mode.
This page summarizes the builtin in Rush documentation. POSIX is the normative reference for detailed portable behavior.
See the POSIX definition for command-specific status rules. Usage errors generally return a non-zero status.
alias(1), unalias(1), rush-builtins(7), POSIX Shell Command Language.