zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@zsh.org
Subject: Re: Lazy loading completions
Date: Thu, 18 Apr 2013 16:37:39 -0700	[thread overview]
Message-ID: <130418163739.ZM8718@torch.brasslantern.com> (raw)
In-Reply-To: <njriley-497078.17231118042013@news.gmane.org>

On Apr 18,  5:23pm, Nicholas Riley wrote:
} Subject: Lazy loading completions
}
} compctl -K virtualenvwrapper_load $(echo ${_VIRTUALENVWRAPPER_API})

compctl has been mostly deprecated for several years.  You should look
into running compinit from your shell startup to set up more modern
completions.

In fact, someone should suggest to Doug Hellmann that he stop using
compctl commands in virtualenvwrapper.sh ... compctl won't work at all
for someone using compinit unless they've configured it to fall through
to old-style completions when no modern completion is found.

}     source /usr/local/bin/virtualenvwrapper_lazy.sh
}     _virtualenvwrapper_load_compctl() {
}       compctl + ${=_VIRTUALENVWRAPPER_API}
}       virtualenvwrapper_load
}       eval ${$(compctl | egrep '^'$_comp_command1' -K')[3]}
}     }

??  Where is the value of $_comp_command1 coming from here?  It's not set
by virtualenvwrapper_load or virtualenvwrapper.sh as far as I can tell,
so that egrep is doing nothing ...?

}     compctl -K _virtualenvwrapper_load_compctl ${=_VIRTUALENVWRAPPER_API}

With compinit loaded, I believe what you want here is

    _virtualenvwrapper_load_compctl() {
      unset '_comps['${(k)^_comps[(R)_virtualenvwrapper_load_compctl]}']'
      virtualenvwrapper_load
      # Until Doug gets his act together
      zmodload -i zsh/compctl
      zstyle ':completion:*' use-compctl yes
      _default
      # After togetherness
      # _normal
    }
    compdef _virtualenvwrapper_load_compctl ${=_VIRTUALENVWRAPPER_API}

but I'm not entirely confident.


      reply	other threads:[~2013-04-18 23:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-18 22:23 Nicholas Riley
2013-04-18 23:37 ` Bart Schaefer [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=130418163739.ZM8718@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-users@zsh.org \
    /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).