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

Re: Completing a unique prefix of "script" completes "script"



On 8/10/06, Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx> wrote:
"Nikolai Weibull" wrote:
> Is there a way to make sure that both options, i.e., "script/" and
> "script ", are completed?

You can cheat and unhash the command if you never use it.  "unhash
script" did seem to do the trick.  Note, however, that a "rehash" will
bring it back.

It seems that the hash table is initialized after .zshrc is read.  Is
there a way to run some scripts after everything is initiaziled?

I just stuck

[[ -n $(whence script) ]] && unhash script

in my .zshrc and figured that it'd work ($path being set in my
.zprofile).  That failing, I put a "rehash" before that line.  I still
get

/home/now/.local/etc/zsh/.zshrc:unhash:36: no such hash table element: script

What am I missing?

And thanks for the very complete answer.  Too bad none of the
solutions seem to work very well.

 nikolai



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