From f0f21bdecd8b56b58e5df9d7ec5736cb18b3a1f5 Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Sat, 12 Dec 2020 08:22:24 +0100 Subject: [PATCH] Minor refactoring to __fish_git_local_branches --- share/completions/git.fish | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/completions/git.fish b/share/completions/git.fish index d83f1b90c..4b1b37520 100644 --- a/share/completions/git.fish +++ b/share/completions/git.fish @@ -59,8 +59,8 @@ function __fish_git_branches end function __fish_git_local_branches - __fish_git for-each-ref --format='%(refname)' refs/heads/ refs/remotes/ 2>/dev/null \ - | string replace -rf '^refs/heads/(.*)$' '$1\tLocal Branch' + __fish_git for-each-ref --format='%(refname:strip=2)' refs/heads/ 2>/dev/null \ + | string replace -rf '.*' '$0\tLocal Branch' end function __fish_git_unique_remote_branches