summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Completion/Unix/Command/_libvirt1
2 files changed, 4 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index d10ba8a26..be821de99 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2016-09-06 Daniel Shahaf <d.s@daniel.shahaf.name>
+ * 39171: Completion/Unix/Command/_libvirt: Apply
+ $opt_args-unescaping.
+
* unposted: Completion/Unix/Command/_libvirt: Escape $words
elements to avoid their interpretation as a pattern against
$_cache_virsh_cmds.
diff --git a/Completion/Unix/Command/_libvirt b/Completion/Unix/Command/_libvirt
index 8ddc28102..658e197dc 100644
--- a/Completion/Unix/Command/_libvirt
+++ b/Completion/Unix/Command/_libvirt
@@ -116,6 +116,7 @@ esac
local -a conn_opt
if [[ -n ${(v)opt_args[(I)-c|--connect]} ]]; then
local uri=${(v)opt_args[(I)-c|--connect]}
+ uri=${uri//(#m)\\([\\:])/${MATCH[2]}} # opt_args elements are colon-escaped
# For the libvirt remote URI syntax, see:
# https://libvirt.org/guide/html/Application_Development_Guide-Architecture-Remote_URIs.html
[[ -z ${(Q)uri//([[:alnum:]]|+|:|\/|@|-|\.|\?|=)} ]] && \