about summary refs log tree commit diff
path: root/Completion/Core/_normal
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>2000-02-03 17:22:40 +0000
committerTanaka Akira <akr@users.sourceforge.net>2000-02-03 17:22:40 +0000
commited41dafd3c79ebf2ce390ee9af54fe8bb21deb73 (patch)
treea45e062eb30e19f11c04c8bb7d30e36c1b77eb7e /Completion/Core/_normal
parent52a67fbbda1eda1e45d9aa6eed6c9650fbd6d0b1 (diff)
downloadzsh-ed41dafd3c79ebf2ce390ee9af54fe8bb21deb73.tar.gz
zsh-ed41dafd3c79ebf2ce390ee9af54fe8bb21deb73.tar.xz
zsh-ed41dafd3c79ebf2ce390ee9af54fe8bb21deb73.zip
zsh-workers/9546
Diffstat (limited to 'Completion/Core/_normal')
-rw-r--r--Completion/Core/_normal8
1 files changed, 4 insertions, 4 deletions
diff --git a/Completion/Core/_normal b/Completion/Core/_normal
index a9e1dc5e4..c3315610f 100644
--- a/Completion/Core/_normal
+++ b/Completion/Core/_normal
@@ -16,7 +16,7 @@ local curcontext="$curcontext"
 
 command="$words[1]"
 if [[ CURRENT -eq 1 ]]; then
-  curcontext="${curcontext}:-command-"
+  curcontext="${curcontext%:*:*}:-command-:"
 
   comp="$_comps[-command-]"
   [[ -z "$comp" ]] || "$comp" && ret=0
@@ -26,15 +26,15 @@ else
   if [[ "$command[1]" == '=' ]]; then
     eval cmd1\=$command
     cmd2="$command[2,-1]"
-    curcontext="${curcontext}::${cmd2}:"
+    curcontext="${curcontext%:*:*}:${cmd2}:"
   elif [[ "$command" == */* ]]; then
     cmd1="$command"
     cmd2="${command:t}"
-    curcontext="${curcontext}::${cmd2}:"
+    curcontext="${curcontext%:*:*}:${cmd2}:"
   else
     cmd1="$command"
     cmd2="$commands[$command]"
-    curcontext="${curcontext}::${cmd1}:"
+    curcontext="${curcontext%:*:*}:${cmd1}:"
   fi
 fi