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

Re: command-spelling correction strangeness



On Sep 29,  2:02am, Paul Kimoto wrote:
} Subject: Re: command-spelling correction strangeness
}
} On Wed, Sep 29, 1999 at 05:39:43AM +0000, Bart Schaefer wrote:
} > However, if you have the hashcmds option set, the rest of the path is
} > searched and the correct location gets immediately added back again --
} > so you do not set hashcmds.  Am I correct?
} 
} Yes (as you may have seen in my "zsh -f" demonstration).

That's actually puzzling, because when I run "zsh -f" for 3.1.6-pws-6,
all of hashcmds, hashdirs, and hashlistall are set.

Does your /etc/zshenv unset these, perhaps?

} I am now a little mystified by the documentation where it says:
} 
} : HASH_CMDS <D>
} :      Note the location of each command the first time it is executed.
} :      Subsequent invocations of the same command will use the saved
} :      location, avoiding a path search.  If this option is unset, no
}                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
} :      path hashing will be done at all.
}        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The manual is only partly correct, because ...

} > I'd be just as
} > happy with encouraging people not to use "correct" without "hashcmds" ...

... it turns out that the implementation of "correct" causes hashing to
occur, in which case the setting of hashdirs is respected independently
of hashcmds.

Given that "correct" silently causes hashing to occur, I think the patch
that I posted is a necessary one.  zsh-workers:  Should the doc be updated
to reflect that "correct" overrides "nohashcmds"?

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



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