[PATCH]: shell-complete command
Clint Adams
schizo at debian.org
Mon Aug 22 05:20:09 BST 2005
> That looks good. I've merged it in, but made it a hidden command
> because users won't normally want to see it in the help.
>
> Do you have a zsh script that uses this yet? I'd love to ship one.
All I have is what's attached.
It will need to be modified to parse the output of
`bzr shell-complete <command>`.
The output of shell-complete probably should be modified to
facilitate this. For example, in the output of
"shell-complete branch", there is no indication that -r takes an
argument. It would be preferable if this information were available
for shell-complete to spew forth.
Also, the meanings of the takes_args words and suffixes are
not all obvious to me. Is there a difference between "file" and
"filename"?
For each takes_arg term, a rule will need to be put into either
shell-complete itself or _bzr. The same is true of some, if not all, of
the suffixes.
Beyond these two problems, it's just a matter of determining the
possible completions for each type of argument.
-------------- next part --------------
#compdef bzr
local _bzr_subcommands expl curcontext="$curcontext"
_bzr_subcommands=(${(f)"$(_call_program bzr bzr shell-complete)"})
if (( CURRENT == 2 )); then
_describe -t subcommand 'subcommand' _bzr_subcommands
else
# this part missing
fi
More information about the bazaar
mailing list