From 68f67ff46cd4f10cb8f770199cee755c34397758 Mon Sep 17 00:00:00 2001 From: David Adam Date: Sun, 12 Jun 2022 22:10:36 +0800 Subject: [PATCH] git completions: make :/:-prefixed paths work everywhere on old git git versions that only support porcelain v1 output (like on CentOS 7, which has 1.8.3) weren't completing files prefixed with : correctly iff the name after the colon was also a valid relative path. Fixes the tests on CentOS 7. --- share/completions/git.fish | 1 + 1 file changed, 1 insertion(+) diff --git a/share/completions/git.fish b/share/completions/git.fish index 35cd87faa..92fad633d 100644 --- a/share/completions/git.fish +++ b/share/completions/git.fish @@ -487,6 +487,7 @@ function __fish_git_files end if test "$root/$relfile" = (pwd -P)/$relfile + and not string match -q ':*' -- (commandline -ct) set file $relfile end