about summary refs log tree commit diff
path: root/Completion/Unix/Command/_postfix
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2016-09-16 04:02:08 +0000
committerDaniel Shahaf <d.s@daniel.shahaf.name>2016-09-16 04:02:12 +0000
commitd523ddaba2cd160343b54d3e38ea001c63a87dc6 (patch)
tree5122213beacb002c526c20e1785be7afe51a62c6 /Completion/Unix/Command/_postfix
parent6914fb298d5b736a331a87f6e2510903c6e89b84 (diff)
downloadzsh-d523ddaba2cd160343b54d3e38ea001c63a87dc6.tar.gz
zsh-d523ddaba2cd160343b54d3e38ea001c63a87dc6.tar.xz
zsh-d523ddaba2cd160343b54d3e38ea001c63a87dc6.zip
unposted: _postfix: Correct quoting in _call_program invocations.
Fixes completion when the command name ('postconf') or the argument to
the -c option ('/etc/postfix') are quoted on the command line, as in

    % postconf -c '/etc/postfix' ... <TAB>
Diffstat (limited to 'Completion/Unix/Command/_postfix')
-rw-r--r--Completion/Unix/Command/_postfix6
1 files changed, 3 insertions, 3 deletions
diff --git a/Completion/Unix/Command/_postfix b/Completion/Unix/Command/_postfix
index 26a262bd3..006c950e3 100644
--- a/Completion/Unix/Command/_postfix
+++ b/Completion/Unix/Command/_postfix
@@ -30,11 +30,11 @@ _postfix_main_cf_parameter() {
       #
       # don't bother to add -c in this case: the defaults don't depend on the config dir.
       _wanted parameters expl 'main.cf parameter' compadd "$@" -- \
-        ${${(f)"$(_call_program postconf_-d "${(q)words[1]} -$kind")"}%% =*}
+        ${${(f)"$(_call_program postconf_-d "${words[1]} -$kind")"}%% =*}
       ;;
     (n)
       # Show the values too.
-      local -a kv=( ${${(f)"$(_call_program postconf_-n "${(q)words[1]} ${opt_args[-c]+"-c ${(q)opt_args[-c]}"} -$kind")"}/ = /:} )
+      local -a kv=( ${${(f)"$(_call_program postconf_-n "${words[1]} ${opt_args[-c]+"-c ${opt_args[-c]}"} -$kind")"}/ = /:} )
       _describe -t parameters 'main.cf parameter' kv
       ;;
     (*)
@@ -50,7 +50,7 @@ _postfix_main_cf_parameter_and_value() {
   # completing «postconf foo=bar=<TAB>» would change main.cf.  So, don't remove
   # it.
   if compset -P 1 '*='; then
-    local value="`_call_program postconf-get-value-at-dir "${(q)words[1]} ${opt_args[-c]+"-c ${(q)opt_args[-c]}"} -h -- ${(q)IPREFIX%=}"`"
+    local value="`_call_program postconf-get-value-at-dir "${words[1]} ${opt_args[-c]+"-c ${opt_args[-c]}"} -h -- ${(q)IPREFIX%=}"`"
     [[ -n $value ]] && compadd "$@" -- $value
   else
     _postfix_main_cf_parameter d -S=