about summary refs log tree commit diff
path: root/Completion/Unix/Command/_libvirt
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2016-09-06 01:59:22 +0000
committerDaniel Shahaf <d.s@daniel.shahaf.name>2016-09-06 14:54:05 +0000
commit9a722df3a6643696a54421994c8908459e29a947 (patch)
tree305a0a99f77019cd50eae25e9a10e53fc6ecec75 /Completion/Unix/Command/_libvirt
parent3768fcc28a28b02ae786faa013fc132cad8582fa (diff)
downloadzsh-9a722df3a6643696a54421994c8908459e29a947.tar.gz
zsh-9a722df3a6643696a54421994c8908459e29a947.tar.xz
zsh-9a722df3a6643696a54421994c8908459e29a947.zip
unposted: _libvirt: Escape $words elements to avoid their interpretation as a pattern against $_cache_virsh_cmds.
Diffstat (limited to 'Completion/Unix/Command/_libvirt')
-rw-r--r--Completion/Unix/Command/_libvirt4
1 files changed, 2 insertions, 2 deletions
diff --git a/Completion/Unix/Command/_libvirt b/Completion/Unix/Command/_libvirt
index d68f82d5e..8ddc28102 100644
--- a/Completion/Unix/Command/_libvirt
+++ b/Completion/Unix/Command/_libvirt
@@ -133,7 +133,7 @@ case $state in
     fi
     local cmd word
     for word in ${words:1}; do
-      [[ -n "${_cache_virsh_cmds[(r)$word]}" ]] && cmd=$word && break
+      [[ -n "${_cache_virsh_cmds[(r)${(b)word}]}" ]] && cmd=$word && break
     done
     [[ -z $cmd ]] && return 1
     local -a values
@@ -213,7 +213,7 @@ case $state in
   virt_admin_cmd_opts)
     local cmd word
     for word in ${words:1}; do
-      [[ -n "${_cache_virt_admin_cmds[(r)$word]}" ]] && cmd=$word && break
+      [[ -n "${_cache_virt_admin_cmds[(r)${(b)word}]}" ]] && cmd=$word && break
     done
     [[ -z $cmd ]] && return 1
     if [[ $words[CURRENT-1] == --server ]]; then