From e2aa560919a2398d87ffb2a36e2cad8184f70c74 Mon Sep 17 00:00:00 2001 From: Bao Trinh Date: Wed, 18 Feb 2026 06:51:14 -0600 Subject: github #156: _git: fix --git-dir and --work-tree options when used with parameters --- Completion/Unix/Command/_git | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Completion/Unix/Command/_git') diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index f54d846d3..e9f72799c 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -8964,8 +8964,8 @@ _git() { ;; (option-or-argument) curcontext=${curcontext%:*:*}:git-$words[1]: - (( $+opt_args[--git-dir] )) && local -x GIT_DIR=${(Q)${~opt_args[--git-dir]}} - (( $+opt_args[--work-tree] )) && local -x GIT_WORK_TREE=${(Q)${~opt_args[--work-tree]}} + (( $+opt_args[--git-dir] )) && local -x GIT_DIR=${(eQ)${~opt_args[--git-dir]}} + (( $+opt_args[--work-tree] )) && local -x GIT_WORK_TREE=${(eQ)${~opt_args[--work-tree]}} if ! _call_function ret _git-$words[1]; then if [[ $words[1] = \!* ]]; then words[1]=${words[1]##\!} -- cgit v1.3