* Non-controversial patch?
@ 2004-10-17 4:40 Bart Schaefer
0 siblings, 0 replies; only message in thread
From: Bart Schaefer @ 2004-10-17 4:40 UTC (permalink / raw)
To: zsh-workers
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?)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-10-17 4:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-17 4:40 Non-controversial patch? Bart Schaefer
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).