mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-19 03:31:14 +02:00
23206: completion for hg.
This commit is contained in:
parent
335fcaa9c5
commit
363308f3df
2 changed files with 31 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2007-03-08 Clint Adams <clint@zsh.org>
|
||||||
|
|
||||||
|
* 23206: Completion/Unix/Commands/_mercurial: completion for hg.
|
||||||
|
|
||||||
2007-03-05 Clint Adams <clint@zsh.org>
|
2007-03-05 Clint Adams <clint@zsh.org>
|
||||||
|
|
||||||
* 23205: Doc/Zsh/options.yo: fix misspelling of "effect".
|
* 23205: Doc/Zsh/options.yo: fix misspelling of "effect".
|
||||||
|
|
27
Completion/Unix/Command/_mercurial
Normal file
27
Completion/Unix/Command/_mercurial
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
#compdef hg
|
||||||
|
|
||||||
|
local context state line
|
||||||
|
typeset -A opt_args
|
||||||
|
|
||||||
|
if (( ! $+_mercurial_cmds )); then
|
||||||
|
local _mercurial_cmds
|
||||||
|
_mercurial_cmds=( $($service debugcomplete) )
|
||||||
|
fi
|
||||||
|
if (( ! $+_mercurial_options )); then
|
||||||
|
local _mercurial_options
|
||||||
|
_mercurial_options=( $($service debugcomplete --options) )
|
||||||
|
fi
|
||||||
|
|
||||||
|
_arguments \
|
||||||
|
"$_mercurial_options[@]" \
|
||||||
|
'*:command:->subcmds' && return 0
|
||||||
|
|
||||||
|
case "$state" in
|
||||||
|
(subcmds)
|
||||||
|
if (( CURRENT == 2 )); then
|
||||||
|
compadd -- "$_mercurial_cmds[@]"
|
||||||
|
else
|
||||||
|
_files
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
Loading…
Reference in a new issue