From df51fea897ae6d620b8b252b2e315b73cf052c16 Mon Sep 17 00:00:00 2001 From: Aaron Gyes Date: Tue, 2 Aug 2022 00:15:50 -0700 Subject: [PATCH] git completion: use new test -ef Just an opportunistic little cleanup. Technically faster. --- share/completions/git.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/completions/git.fish b/share/completions/git.fish index ccb1153a0..b05fca8ce 100644 --- a/share/completions/git.fish +++ b/share/completions/git.fish @@ -490,7 +490,7 @@ function __fish_git_files set file (string replace -- "$root/" ":/:" "$root/$relfile") end - if test "$root/$relfile" = (pwd -P)/$relfile + if test "$root/$relfile" -ef "$relfile" and not string match -q ':*' -- (commandline -ct) set file $relfile end