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

Re: Lazy loading completions



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.



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