summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Base/Core/_message10
-rw-r--r--Completion/Base/Utility/_guard13
-rw-r--r--Completion/Unix/Command/_grep2
-rw-r--r--Completion/Unix/Command/_pbm2
-rw-r--r--Completion/Unix/Command/_pine4
-rw-r--r--Completion/X/Command/_vnc2
6 files changed, 17 insertions, 16 deletions
diff --git a/Completion/Base/Core/_message b/Completion/Base/Core/_message
index 979dfa097..2ad778082 100644
--- a/Completion/Base/Core/_message
+++ b/Completion/Base/Core/_message
@@ -3,11 +3,17 @@
 local format raw gopt
 
 if [[ "$1" = -e ]]; then
-  local expl ret=1
+  local expl ret=1 tag
 
   _comp_mesg=yes
 
-  _tags "$2" && while _next_label "$2" expl "$3"; do
+  if (( $# > 2 )); then
+    tag="$2"
+    shift
+  else
+    tag="$curtag"
+  fi
+  _tags "$tag" && while _next_label "$tag" expl "$2"; do
     compadd ${expl:/-X/-x}
     ret=0
   done
diff --git a/Completion/Base/Utility/_guard b/Completion/Base/Utility/_guard
index 4c07fe1b9..ff62981ce 100644
--- a/Completion/Base/Utility/_guard
+++ b/Completion/Base/Utility/_guard
@@ -1,17 +1,12 @@
 #autoload
 
-local mesg pat garbage
+local garbage
 
-mesg=()
-zparseopts -K -D -a garbage M: J: V: 1 2 n F: X:=mesg 
+zparseopts -K -D -a garbage M: J: V: 1 2 n F: X:
 
 [[ "$PREFIX$SUFFIX" != $~1 ]] && return 1
 
-if [[ $# -gt 1 || $#mesg -eq 0 ]]; then
-  shift
-  _message "$*"
-else
-  _message -r "$mesg[2]"
-fi
+shift
+_message -e "$*"
 
 [[ -n "$PREFIX$SUFFIX" ]]
diff --git a/Completion/Unix/Command/_grep b/Completion/Unix/Command/_grep
index 3b3e01ef3..db0d6301e 100644
--- a/Completion/Unix/Command/_grep
+++ b/Completion/Unix/Command/_grep
@@ -51,7 +51,7 @@ arguments=( $arguments[@]
   '(--null -Z --no-filename -h)'{--null,-Z}'[print 0 byte after FILE name]'
   '--help[display help]'
   '--mmap[memory map input]'
-  '(-e --regexp -f --file)1:pattern:_guard "^--*"'
+  '(-e --regexp -f --file)1: :_guard "^--*" pattern'
   '*:files:_files'
 )
 
diff --git a/Completion/Unix/Command/_pbm b/Completion/Unix/Command/_pbm
index 66951f040..388249f9d 100644
--- a/Completion/Unix/Command/_pbm
+++ b/Completion/Unix/Command/_pbm
@@ -398,7 +398,7 @@ pnmpad)
     '-l-[specify left border width]:left border width:' \
     '-r-[specify right border width]:right border width:' \
     '-t-[specify top border width]:top border width:' \
-    '-b-[specify bottom border width]:bottom border width:_guard "[0-9]#"' \
+    '-b-[specify bottom border width]: :_guard "[0-9]#" "bottom border width"' \
     ':file: _pbm'
   ;;
 
diff --git a/Completion/Unix/Command/_pine b/Completion/Unix/Command/_pine
index 736fdc223..9ee0b44c9 100644
--- a/Completion/Unix/Command/_pine
+++ b/Completion/Unix/Command/_pine
@@ -34,11 +34,11 @@ _arguments -C -s \
   "($opts $idx -url)-attach_and_delete[go to composer, attach file, delete when finished]:file:_files" \
   "($opts $idx $send)-url[open the given URL]:url:->url" \
   "($opts $send)-f+[specify mailbox to load]:mailbox: _mailboxes" \
-  "($opts $send)-c+[specify context to apply to -f arg]:number:_guard '[0-9]#'" \
+  "($opts $send)-c+[specify context to apply to -f arg]: :_guard '[0-9]#' number" \
   "($opts $send)-sort[specify sort order of folder]:sort order:(${(j: :)sortorder})" \
   "($opts $send)-i[go directly to index, bypassing main menu]" \
   "($opts $send)-I+[specify initial keystrokes to be executed]:keystrokes" \
-  "($opts $send)-n+[entry in index to begin on]:number:_guard '[0-9]#'" \
+  "($opts $send)-n+[entry in index to begin on]: :_guard '[0-9]#' number" \
   "($opts $send)-o[open first folder read-only]" \
   "(-F -h -v)-r[restricted - can only send mail to oneself]" \
   "(-h -v)-d[set debug level]:debug:(0 1 2 3 4 5 6 7 8 9 flush timestamp imap= numfiles= verbose=)" \
diff --git a/Completion/X/Command/_vnc b/Completion/X/Command/_vnc
index ce324a81d..ed39bdb2f 100644
--- a/Completion/X/Command/_vnc
+++ b/Completion/X/Command/_vnc
@@ -13,7 +13,7 @@ case $service in
 	'-geometry:geometry:(1600x1200 1280x1024 1152x864 1024x768 800x600 640x480)' \
 	'-depth:pixel depth:(8 16 24 32)' \
 	'-pixelformat:pixel format' \
-	'1::display number:_guard "(|:[0-9]#)"' \
+	'1:: :_guard "(|:[0-9]#)" "display number"' \
       - kill \
 	"-kill:display number:($displays)" \
       - help \