Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Symmetry of hash/unhash



> Why doesn't "hash" accept "-a" for aliases, like "unhash"?  Shouldn't
> "hash -f" mean functions, like "unhash"?
> 
> Or maybe it's "unhash" that should *lose* -a and -f.  Is there any
> difference between "unalias" and "unhash -a", or "unfunction" and 
> "unhash -f"?

unhash -a and unalias are (internal) aliases for the same thing.
The same is true for unfunction and unhash -f.

It just worked out that when I has rewriting all the hash table
code that I could easily overload unhash to handle unalias and
unfunction.  The fact that you can also use unhash -a and unhash -f
is unimportant.

To try to improve the symmetry any further would just needlessly
complicate the code with little gain.

rc




Messages sorted by: Reverse Date, Date, Thread, Author