* hashcmd path
@ 2006-03-14 3:31 Clint Adams
2006-03-14 4:00 ` Bart Schaefer
0 siblings, 1 reply; 3+ messages in thread
From: Clint Adams @ 2006-03-14 3:31 UTC (permalink / raw)
To: zsh-workers
What is the purpose of calling hashcmd() in execcmd() with the value of
pathchecked rather than path?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: hashcmd path
2006-03-14 3:31 hashcmd path Clint Adams
@ 2006-03-14 4:00 ` Bart Schaefer
2006-03-14 17:56 ` Clint Adams
0 siblings, 1 reply; 3+ messages in thread
From: Bart Schaefer @ 2006-03-14 4:00 UTC (permalink / raw)
To: zsh-workers
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: hashcmd path
2006-03-14 4:00 ` Bart Schaefer
@ 2006-03-14 17:56 ` Clint Adams
0 siblings, 0 replies; 3+ messages in thread
From: Clint Adams @ 2006-03-14 17:56 UTC (permalink / raw)
To: Bart Schaefer; +Cc: zsh-workers
> 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.
Seems that pathchecked is empty when hashcmd() is called after a
spell-correction attempt, and thus the command being run never gets
hashed automatically.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-03-14 17:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-14 3:31 hashcmd path Clint Adams
2006-03-14 4:00 ` Bart Schaefer
2006-03-14 17:56 ` Clint Adams
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).