zsh: add --style and --template opts
authorBrendan Cully <brendan@kublai.com>
Tue, 24 Oct 2006 11:10:04 -0700
changeset 3495 0e80552e1275
parent 3494 40fabb2a64b8
child 3496 72b9a3b8bb1d
zsh: add --style and --template opts
contrib/zsh_completion
--- a/contrib/zsh_completion	Tue Oct 24 11:10:04 2006 -0700
+++ b/contrib/zsh_completion	Tue Oct 24 11:10:04 2006 -0700
@@ -42,6 +42,10 @@
         '*-X-[exclude names matching the given patterns]:dir:_files -W $(hg root) -/'
         '*--exclude-[exclude names matching the given patterns]:dir:_files -W $(hg root) -/')
 
+styleOpts=(
+        '--style[display using template map file]:'
+        '--template[display with template]:')
+
 commitMessage=(
         '(-m --message -l --logfile --edit)-e[edit commit message]'
         '(-m --message -l --logfile -e)--edit[edit commit message]'
@@ -238,7 +242,7 @@
     ;;
 
     (log|history)
-        _arguments $includeExclude \
+        _arguments $includeExclude $styleOpts \
         '*-r[show the specified revision or range]:revision:->tags' \
         '*--rev[show the specified revision or range]:revision:->tags' \
         '(--no-merges -M --only-merges)-m[show only merge revisions]' \
@@ -325,7 +329,7 @@
     ;;
 
     (incoming)
-        _arguments \
+        _arguments $styleOpts \
         '(--patch)-p[show patch]' \
         '(-p)--patch[show patch]' \
         '(--no-merges)-M[do not show merge revisions]' \
@@ -359,7 +363,7 @@
     ;;
 
     (outgoing)
-        _arguments \
+        _arguments $styleOpts \
         '(--patch)-p[show patch]' \
         '(-p)--patch[show patch]' \
         '(--no-merges)-M[do not show merge revisions]' \
@@ -417,7 +421,7 @@
     ;;
 
     (heads)
-        _arguments \
+        _arguments $styleOpts \
         '(--branches)-b[find branch info]' \
         '(-b)--branches[find branch info]'
     ;;
@@ -435,7 +439,7 @@
     ;;
 
     (par*)
-        _arguments \
+        _arguments $styleOpts \
         '(--rev 1)-r[show parents of the specified rev]:revision:->tags' \
         '(-r 1)--rev[show parents of the specified rev]:revision:->tags' \
 	'::revision:->tags'