Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Non-controversial patch?
- X-seq: zsh-workers 20494
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Non-controversial patch?
- Date: Sat, 16 Oct 2004 21:40:07 -0700 (PDT)
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- Reply-to: zsh-workers@xxxxxxxxxx
I'd like to change _generic so that any positional parameters are passed 
on through to _main_complete.  This would be transparent to anyone who is 
already using _generic.
Among other things, this allows one to do
  zle -C call-completer complete-word _generic
and then e.g.
  foo() { zle call-completer _foo }
  zle -N foo
which I think is marginally more comprehensible than
  zle -C foo complete-word _generic
  zstyle ':completion:foo:*' completer _foo
but perhaps that's just me.
The real reason I want it is so that I can prefix certain other function 
definitions with
  #compdef -k complete-word ^Xx
  if [[ -z "$curcontext" ]]; then
     _generic $0
     return
  fi
and thereby cause assorted zstyles to be applied uniformly.  Yes, I could 
call _main_complete directly there, but the initial $curcontext assigned 
by _generic is still convenient.
(I wonder if _bash_completions might rather call _generic as well, to 
allow different zstyles for bash v. zsh completions?)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author