about summary refs log tree commit diff
path: root/Completion/Core
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>2000-02-16 17:12:51 +0000
committerTanaka Akira <akr@users.sourceforge.net>2000-02-16 17:12:51 +0000
commit66b9bee81ee99907a4bafdac62bcc184a574b17e (patch)
tree24aaca71de610f9e53d58e4eb8093f4c4af9d0a1 /Completion/Core
parent041514beb7fe52702ee5e04c7c1a20c11d39053e (diff)
downloadzsh-66b9bee81ee99907a4bafdac62bcc184a574b17e.tar.gz
zsh-66b9bee81ee99907a4bafdac62bcc184a574b17e.tar.xz
zsh-66b9bee81ee99907a4bafdac62bcc184a574b17e.zip
zsh-workers/9765
Diffstat (limited to 'Completion/Core')
-rw-r--r--Completion/Core/_sep_parts6
1 files changed, 3 insertions, 3 deletions
diff --git a/Completion/Core/_sep_parts b/Completion/Core/_sep_parts
index 66f289837..11fb20ab6 100644
--- a/Completion/Core/_sep_parts
+++ b/Completion/Core/_sep_parts
@@ -57,7 +57,7 @@ while [[ $# -gt 1 ]]; do
 
   # Get the matching array elements.
 
-  PREFIX="${str%%${sep}*}"
+  PREFIX="${str%%(|\\)${sep}*}"
   builtin compadd -O testarr - "${(@P)arr}"
   [[ $#testarr -eq 0 && -n "$_comp_correct" ]] &&
     compadd -O testarr - "${(@P)arr}"
@@ -129,7 +129,7 @@ while [[ $# -gt 0 && "$str" == *${1}* ]]; do
   [[ $#tmparr -eq 0 && -n "$_comp_correct" ]] &&
     compadd -O tmparr - "${(@P)arr}"
 
-  suffixes=("${(@)^suffixes[@]}${1}${(@)^tmparr}")
+  suffixes=("${(@)^suffixes[@]}${(q)1}${(@)^tmparr}")
 
   # We want the completion code to generate the most specific suffix
   # for us, so we collect matching specifications that allow partial
@@ -142,7 +142,7 @@ done
 # If we were given at least one more separator we make the completion
 # code offer it by appending it as a autoremovable suffix.
 
-(( $# )) && autosuffix=(-qS "$1")
+(( $# )) && autosuffix=(-qS "${(q)1}")
 
 # If we have collected matching specifications, we build an array
 # from it that can be used as arguments to `compadd'.