From: "Nikolai Weibull" <now@bitwi.se>
To: "Peter Stephenson" <pws@csr.com>
Cc: zsh-users@sunsite.dk
Subject: Re: Completing a unique prefix of "script" completes "script"
Date: Tue, 15 Aug 2006 00:36:23 +0200 [thread overview]
Message-ID: <dbfc82860608141536q33517b1j43b6a1d9b1067bc1@mail.gmail.com> (raw)
In-Reply-To: <20060814131259.596d6ece.pws@csr.com>
On 8/14/06, Peter Stephenson <pws@csr.com> wrote:
> "Nikolai Weibull" <now@bitwi.se> 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
next prev parent reply other threads:[~2006-08-14 22:36 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <now@bitwi.se>
2006-08-10 20:17 ` Nikolai Weibull
2006-08-10 21:41 ` Peter Stephenson
2006-08-13 14:49 ` Nikolai Weibull
2006-08-14 12:12 ` Peter Stephenson
2006-08-14 22:36 ` Nikolai Weibull [this message]
2006-08-13 14:59 ` Nikolai Weibull
2006-08-13 16:34 ` Peter Stephenson
2006-08-13 17:01 ` Nikolai Weibull
2006-11-21 22:57 ` Problem with _arguments Nikolai Weibull
2006-11-21 23:42 ` Peter Stephenson
2006-11-22 8:35 ` Nikolai Weibull
2006-11-22 10:39 ` Peter Stephenson
2006-11-22 15:55 ` Bart Schaefer
2006-11-22 22:22 ` Nikolai Weibull
2006-11-24 20:56 ` Bart Schaefer
2006-11-22 21:31 ` Nikolai Weibull
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dbfc82860608141536q33517b1j43b6a1d9b1067bc1@mail.gmail.com \
--to=now@bitwi.se \
--cc=pws@csr.com \
--cc=zsh-users@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).