summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2009-07-30 19:01:56 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2009-07-30 19:01:56 +0000
commit5449458e5a1f3cafd04c1a5bac25f9d64ecb9b91 (patch)
treeffcc90fd16a9101df2e1799f5f873fd207d594a4 /Completion
parent72f0b14a0448ecf50935a1f6c90337c3d1c969af (diff)
downloadzsh-5449458e5a1f3cafd04c1a5bac25f9d64ecb9b91.tar.gz
zsh-5449458e5a1f3cafd04c1a5bac25f9d64ecb9b91.tar.xz
zsh-5449458e5a1f3cafd04c1a5bac25f9d64ecb9b91.zip
users/14267: files added by ignore-line should be quoted
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Base/Core/_description13
1 files changed, 7 insertions, 6 deletions
diff --git a/Completion/Base/Core/_description b/Completion/Base/Core/_description
index 593369a0a..3d993271c 100644
--- a/Completion/Base/Core/_description
+++ b/Completion/Base/Core/_description
@@ -49,13 +49,14 @@ if [[ -z "$_comp_no_ignore" ]]; then
 
   zstyle -s ":completion:${curcontext}:$1" ignore-line hidden &&
     case "$hidden" in
-    true|yes|on|1) _comp_ignore=( "$_comp_ignore[@]" "$words[@]" );;
-    current)       _comp_ignore=( "$_comp_ignore[@]" "$words[CURRENT]" );;
-    current-shown) [[ "$compstate[old_list]" = *shown* ]] &&
-                       _comp_ignore=( "$_comp_ignore[@]" "$words[CURRENT]" );;
+    true|yes|on|1) _comp_ignore=( "$_comp_ignore[@]" ${(q)"${words[@]}"} );;
+    current)       _comp_ignore=( "$_comp_ignore[@]" "${(q)words[CURRENT]}" );;
+    current-shown)
+	    [[ "$compstate[old_list]" = *shown* ]] &&
+            _comp_ignore=( "$_comp_ignore[@]" "${(q)words[CURRENT]}" );;
     other)         _comp_ignore=( "$_comp_ignore[@]"
-                                  "${(@)words[1,CURRENT-1]}"
-				  "${(@)words[CURRENT+1,-1]}" );;
+                                  "${(@q)words[1,CURRENT-1]}"
+				  "${(@q)words[CURRENT+1,-1]}" );;
     esac
 
   # Ensure the ignore option is first so we can override it