From 6c22c0e30df2a978d308d724c156a33038fa7041 Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Tue, 13 Jul 2021 23:59:23 +0200 Subject: [PATCH] completions/git: do not attempt to complete rev:file in option words Fixes #8139 --- 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 92e7eaef1..6cd04bdb9 100644 --- a/share/completions/git.fish +++ b/share/completions/git.fish @@ -514,7 +514,7 @@ function __fish_git_needs_rev_files # This definitely works with `git show` to retrieve a copy of a file as it exists # in the index of revision $rev, it should be updated to include others as they # are identified. - __fish_git_using_command show; and string match -r ".+:" -- (commandline -ot) + __fish_git_using_command show; and string match -r "^[^-].*:" -- (commandline -ot) end function __fish_git_ranges