zsh-workers
 help / color / mirror / code / Atom feed
* Symmetry of hash/unhash
@ 1996-06-23 17:56 Bart Schaefer
  1996-06-24 21:07 ` Richard Coleman
  0 siblings, 1 reply; 2+ messages in thread
From: Bart Schaefer @ 1996-06-23 17:56 UTC (permalink / raw)
  To: zsh-workers

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"?

-- 
Bart Schaefer                             Brass Lantern Enterprises
http://www.well.com/user/barts            http://www.nbn.com/people/lantern

New male in /home/schaefer:
>N  2 Justin William Schaefer  Sat May 11 03:43  53/4040  "Happy Birthday"



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Symmetry of hash/unhash
  1996-06-23 17:56 Symmetry of hash/unhash Bart Schaefer
@ 1996-06-24 21:07 ` Richard Coleman
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Coleman @ 1996-06-24 21:07 UTC (permalink / raw)
  To: schaefer; +Cc: zsh-workers

> 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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1996-06-24 21:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-06-23 17:56 Symmetry of hash/unhash Bart Schaefer
1996-06-24 21:07 ` Richard Coleman

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).