Mercurial > hg
changeset 17396:aaaeea31482a
zsh completion: complete additional topics for `help`, not commands only
author | Nikolaj Sjujskij <sterkrig@myopera.com> |
---|---|
date | Thu, 16 Aug 2012 11:21:46 +0400 |
parents | e82fad58df1e |
children | c785bb3ace29 |
files | contrib/zsh_completion |
diffstat | 1 files changed, 14 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/zsh_completion Mon Aug 27 21:10:11 2012 +0200 +++ b/contrib/zsh_completion Thu Aug 16 11:21:46 2012 +0400 @@ -361,6 +361,19 @@ 'urls:URL:_hg_urls' } +_hg_add_help_topics=( + config dates diffs environment extensions filesets glossary hgignore hgweb + merge-tools multirevs obsolescence patterns phases revisions revsets + subrepos templating urls +) + +_hg_help_topics() { + local topics + (( $#_hg_cmd_list )) || _hg_get_commands + topics=($_hg_cmd_list $_hg_add_help_topics) + _describe -t help_topics 'help topics' topics +} + # Common options _hg_global_opts=( '(--repository -R)'{-R+,--repository}'[repository root directory]:repository:_files -/' @@ -588,7 +601,7 @@ _hg_cmd_help() { _arguments -s -w : $_hg_global_opts \ - '*:mercurial command:_hg_commands' + '*:mercurial help topic:_hg_help_topics' } _hg_cmd_identify() {