about summary refs log tree commit diff
path: root/Completion/Core/_tags
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-11-04 15:44:55 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-11-04 15:44:55 +0000
commitd9f2398db5cdfe63b0a438197272ee6ce7edb453 (patch)
treee4455552ae2945e1515600b0bc73c821db91b7b0 /Completion/Core/_tags
parentcf2aed3500db6942f3fbc59eb35e35603123b44f (diff)
downloadzsh-d9f2398db5cdfe63b0a438197272ee6ce7edb453.tar.gz
zsh-d9f2398db5cdfe63b0a438197272ee6ce7edb453.tar.xz
zsh-d9f2398db5cdfe63b0a438197272ee6ce7edb453.zip
zsh-workers/8537
Diffstat (limited to 'Completion/Core/_tags')
-rw-r--r--Completion/Core/_tags17
1 files changed, 9 insertions, 8 deletions
diff --git a/Completion/Core/_tags b/Completion/Core/_tags
index f6a7fdc11..6517c78ea 100644
--- a/Completion/Core/_tags
+++ b/Completion/Core/_tags
@@ -2,13 +2,14 @@
 
 if (( $# )); then
   local cmd="$words[1]" func="$funcstack[2]" defs i tags tag pat style prio
-
-  while getopts 'c:f:' i; do
-    if [[ "$i" = c ]]; then
-      cmd="$OPTARG"
-    else
-      func="$OPTARG"
-    fi
+  local trynow
+
+  while getopts 'c:f:i' i; do
+    case "$i" in
+    c) cmd="$OPTARG"  ;;
+    f) func="$OPTARG" ;;
+    i) trynow=yes     ;;
+    esac
   done
 
   shift OPTIND-1
@@ -67,7 +68,7 @@ if (( $# )); then
   _prio_names[$funcstack]="$prio"
   eval "${prio}=( \"\${(@)tags:#}\" )"
 
-  return 0
+  [[ -z "$trynow" ]] && return 0
 fi
 
 local prios="$_prio_names[$funcstack]"