zsh-workers
 help / color / mirror / code / Atom feed
From: "Mikael Magnusson" <mikachu@gmail.com>
To: "Peter Stephenson" <pws@csr.com>
Cc: "Zsh hackers list" <zsh-workers@sunsite.dk>
Subject: Re: Tabcomplete autoloads zsh/stat [was: Re: File locking within zsh?]
Date: Fri, 12 May 2006 23:58:32 +0200	[thread overview]
Message-ID: <237967ef0605121458k43d1d549ye9fa25cfd7c8593f@mail.gmail.com> (raw)
In-Reply-To: <200605120952.k4C9qN4d027801@news01.csr.com>

On 5/12/06, Peter Stephenson <pws@csr.com> wrote:
> "Mikael Magnusson" <mikachu@gmail.com> wrote:
> > One thing that has annoyed me recently is that 'stat <tab> autoloads
> > zsh/stat without me asking for it, I never know which stat version is
> > loaded and the options aren't compatible. Should I live with it and
> > alias stat=command stat or is it a bug in the completer? If i have the
> > alias and load the module manually i'll still use the command so it's
> > still not a perfect solution.
>
> The stat completion itself appears not to require zsh/stat, but it's used
> elsewhere.  Quite possibly the culprit is my _list_files addition, which
> loads the module even if you're not using the feature.  Does the following
> help?  (CVS is unwell)
>
> --- Completion/Unix/Type/_list_files.old        2006-05-12 10:40:39.000000000 +0100
> +++ Completion/Unix/Type/_list_files    2006-05-12 10:40:34.000000000 +0100
> @@ -15,8 +15,6 @@
>  listfiles=()
>  listopts=()
>
> -zmodload -i zsh/stat 2>/dev/null || return 1
> -
>  zstyle -a ":completion:${curcontext}:" file-list stylevals || return 1
>
>  # TODO: more flexible way of handling the following?  e.g. use $compstate?
> @@ -48,6 +46,8 @@
>
>  (( ok )) || return 1
>
> +zmodload -i zsh/stat 2>/dev/null || return 1
> +
>  for f in ${(P)1}; do
>    if [[ ! -e "${2:+$2/}$f" ]]; then
>      listfiles+=("${2:+$2/}$f")

That seems to do the trick here.

PS Sorry about sending the reply privately, I'm not so used to gmail
and mailing lists, it defaults to private replies, and reply to all
cc:s the list instead of the sender...

-- 
Mikael Magnusson

      parent reply	other threads:[~2006-05-12 21:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <237967ef0605111440w2c2f37c1j6ccca5188d680e2f@mail.gmail.com>
2006-05-12  9:52 ` Peter Stephenson
2006-05-12 18:21   ` CVS got turned into a newt! (It got better) Wayne Davison
2006-05-12 22:19     ` Mikael Magnusson
2006-05-12 21:58   ` Mikael Magnusson [this message]

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=237967ef0605121458k43d1d549ye9fa25cfd7c8593f@mail.gmail.com \
    --to=mikachu@gmail.com \
    --cc=pws@csr.com \
    --cc=zsh-workers@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).