summary refs log tree commit diff
path: root/Completion/Unix/Command/_git
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2017-06-22 10:05:07 +0100
committerPeter Stephenson <pws@zsh.org>2017-06-22 10:05:07 +0100
commitc5783576e8bcbba5bac4fe9f06699fc8e5a6b8fe (patch)
tree422a2a21037cd1c2bbd2dacb85de020952bee47b /Completion/Unix/Command/_git
parent825f84c77e7e6f31d5f0fc9dd636198477c9a357 (diff)
downloadzsh-c5783576e8bcbba5bac4fe9f06699fc8e5a6b8fe.tar.gz
zsh-c5783576e8bcbba5bac4fe9f06699fc8e5a6b8fe.tar.xz
zsh-c5783576e8bcbba5bac4fe9f06699fc8e5a6b8fe.zip
41339: Unquote treeish argument for git checkout completion
Diffstat (limited to 'Completion/Unix/Command/_git')
-rw-r--r--Completion/Unix/Command/_git4
1 files changed, 2 insertions, 2 deletions
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index a46e3b55d..f764daf75 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -495,8 +495,8 @@ _git-checkout () {
 
       elif [[ -n ${opt_args[(I)-b|-B|-t|--track|--orphan|--detach]} ]]; then
         _nothing
-      elif [[ -n $line[1] ]] && __git_is_treeish $line[1]; then
-        __git_ignore_line __git_tree_files ${PREFIX:-.} $line[1] && ret=0
+      elif [[ -n $line[1] ]] && __git_is_treeish ${(Q)line[1]}; then
+        __git_ignore_line __git_tree_files ${PREFIX:-.} ${(Q)line[1]} && ret=0
       else
         __git_ignore_line __git_modified_files && ret=0
       fi