Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Completing a unique prefix of "script" completes "script"
- X-seq: zsh-users 10605
- From: "Nikolai Weibull" <now@xxxxxxxx>
- To: "Peter Stephenson" <pws@xxxxxxx>
- Subject: Re: Completing a unique prefix of "script" completes "script"
- Date: Tue, 15 Aug 2006 00:36:23 +0200
- Cc: zsh-users@xxxxxxxxxx
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=kvPL0sRmbl/0Bsb/g6HBV1Rt7FHwpQMR+wyBgauCvo3K+CNw9GFccOqvO0REDw+3Uh1E+YKVSz3yQy09lmq0EGH5yn6PRbY742qboSALLXV4M/5hKFk55wpJIdyfPOIXjGElwDdMEneTelLvwJlMf4VOJXrp70PKgpHWAl7uyhw=
- In-reply-to: <20060814131259.596d6ece.pws@xxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <now@xxxxxxxx> <dbfc82860608101317t469b4f6eida99a1a390dc49c0@xxxxxxxxxxxxxx> <200608102141.k7ALfw4J005496@xxxxxxxxxxxxxxxxx> <dbfc82860608130749i64a9331al1ef3a1b6d705b0b@xxxxxxxxxxxxxx> <20060814131259.596d6ece.pws@xxxxxxx>
- Sender: nikolai.weibull@xxxxxxxxx
On 8/14/06, Peter Stephenson <pws@xxxxxxx> wrote:
"Nikolai Weibull" <now@xxxxxxxx> wrote:
> It seems that the hash table is initialized after .zshrc is read. Is
> there a way to run some scripts after everything is initiaziled?
Hmm... I haven't looked at the source but in my case it seems to
be being hashed straight away...
zsh -f -c 'zmodload -i zsh/parameter
print $commands[script]
unhash script
print $commands[script]'
prints /usr/bin/script the first time and nothing the second time.
/etc/zshenv is empty. Aha---it looks like zsh/parameter is filling the
hash table itself (based on the HASHLISTALL option which is on by default).
So maybe putting
zmodload -i zsh/parameter
early in your initialization file (it'll probably be loaded by the completion
system later anyway) is good enough.
Nope. It seems zmodload returns before the hash table is fully
initialized. If I put a "sleep 1" in there it works, but without it
it'll still complain about the command not being hashed.
Actually, a "sleep 0" seems to work as well...
That's /one/ thing /I/ don't understand...
nikolai
Messages sorted by:
Reverse Date,
Date,
Thread,
Author