ast
ast copied to clipboard
The `hash` command should be a builtin not an alias
While working on the b_alias()
function to make it the first builtin to use getopt_long()
rather than optget()
I noticed it has a gross hack to support the bash hash -r
flag needed because hash
is implemented as an alias of alias
. Separate the hash
logic from the alias
logic so those hacks aren't needed.
See also issue #238 where we are discussing removing the code that attempts, incorrectly and which can never be successful, to emulate bash.