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

Re: hashcmd path



On Mar 13, 10:31pm, Clint Adams wrote:
}
} What is the purpose of calling hashcmd() in execcmd() with the value of
} pathchecked rather than path?

The intent -- whether it still works I'm not sure -- is to hash as much
of the path as has been searched, and then the next time a command is
not found in the part already searched, hash some more.  The hash table
thus never contains more than necessary.

This is entirely irrelevant in the face of completion, which always
forces the entire path to be hashed up front, but it holds down memory
usage of non-interactive shells.



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