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