summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Unix/Command/_git4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 8952bd009..fffa8cedd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-06-13 Daniel Shahaf <d.s@daniel.shahaf.name>
+
+ * 38665: Completion/Unix/Command/_git: config option completion:
+ Quote properly.
+
2016-06-12 Barton E. Schaefer <schaefer@zsh.org>
* 38670: Doc/Zsh/contrib.yo, Functions/Zle/add-zle-hook-widget:
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index cc38d4bcf..f868d46cf 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -2567,7 +2567,7 @@ _git-config () {
__git_config_sections -b '(|)' -a '(|)' '^color\.[^.]+\..*$' gettable-color-options option && ret=0
;;
(value)
- local current=${${(0)"$(_call_program current "git config $opt_args[(I)--system|--global|--local] ${(kv)opt_args[(I)-f|--file]} -z --get '$line[1]'")"}#*$'\n'}
+ local current=${${(0)"$(_call_program current "git config $opt_args[(I)--system|--global|--local] ${(kv)opt_args[(I)-f|--file]} -z --get ${(q)line[1]}")"}#*$'\n'}
case $line[1] in
(alias.*)
if [[ -n $current ]]; then
@@ -6706,7 +6706,7 @@ __git_config_get_regexp () {
[[ -n $opts[-a] ]] || opts[-a]='.[^.]##'
[[ $1 == -- ]] && shift
- set -A $2 ${${${(0)"$(_call_program ${3:-$2} "git config -z --get-regexp -- '$1'")"}#${~opts[-b]}}%%${~opts[-a]}$'\n'*}
+ set -A $2 ${${${(0)"$(_call_program ${3:-$2} "git config -z --get-regexp -- ${(q)1}")"}#${~opts[-b]}}%%${~opts[-a]}$'\n'*}
}
(( $+functions[__git_config_sections] )) ||