about summary refs log tree commit diff
path: root/Functions
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-12-07 16:25:53 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-12-07 16:25:53 +0000
commit36b2667e6f7734597f987ee1e6189a6f93200b03 (patch)
tree297fa2c325286a096767e04fccfcf9b4e2506e67 /Functions
parent18e6f5f1ee7f58a5416c4a0341bc79827dfd3a8f (diff)
downloadzsh-36b2667e6f7734597f987ee1e6189a6f93200b03.tar.gz
zsh-36b2667e6f7734597f987ee1e6189a6f93200b03.tar.xz
zsh-36b2667e6f7734597f987ee1e6189a6f93200b03.zip
zsh-workers/8932
Diffstat (limited to 'Functions')
-rw-r--r--Functions/Zle/incremental-complete-word10
1 files changed, 7 insertions, 3 deletions
diff --git a/Functions/Zle/incremental-complete-word b/Functions/Zle/incremental-complete-word
index 61af5d236..657adf3f2 100644
--- a/Functions/Zle/incremental-complete-word
+++ b/Functions/Zle/incremental-complete-word
@@ -16,7 +16,7 @@ incremental-complete-word() {
   #emulate -L zsh
   unsetopt autolist menucomplete automenu # doesn't work well
 
-  local key lbuf="$LBUFFER" rbuf="$RBUFFER" pmpt word
+  local key lbuf="$LBUFFER" rbuf="$RBUFFER" pmpt pstr word
   local lastl lastr wid twid num alt post toolong
   local curcontext="${curcontext}:incremental" stop brk
 
@@ -51,7 +51,9 @@ incremental-complete-word() {
     word="${_lastcomp[unambiguous]}"
     state=''
   fi
-  zle -R "${${${${${${pmpt//\\%u/$word}//\\%s/$state}//\\%c/${_lastcomp[completer][2,-1]}}//\\%n/$num}//\\%a/$alt}//\\%l/$toolong}"
+  compfmt pstr "$pmpt" "u:${word}" "s:$state" "n:$num" "a:$alt" \
+                       "l:$toolong" "c:${_lastcomp[completer][2,-1]}"
+  zle -R "$pstr"
   read -k key
 
   while [[ '#key' -ne '#\\r' && '#key' -ne '#\\n' &&
@@ -97,7 +99,9 @@ incremental-complete-word() {
       word="${_lastcomp[unambiguous]}"
       state=''
     fi
-    zle -R "${${${${${${pmpt//\\%u/$word}//\\%s/$state}//\\%c/${_lastcomp[completer][2,-1]}}//\\%n/$num}//\\%a/$alt}//\\%l/$toolong}"
+    compfmt pstr "$pmpt" "u:${word}" "s:$state" "n:$num" "a:$alt" \
+                       "l:$toolong" "c:${_lastcomp[completer][2,-1]}"
+    zle -R "$pstr"
     read -k key
   done