Minor refactoring to __fish_git_local_branches

This commit is contained in:
Johannes Altmanninger 2020-12-12 08:22:24 +01:00
parent 7e3d3cc30f
commit f0f21bdecd

View file

@ -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