.dotfiles/.config/fish/functions/__git.current_branch.fish
2024-10-21 20:46:27 +03:00

6 lines
200 B
Fish

function __git.current_branch -d "Output git's current branch name"
begin
git symbolic-ref HEAD; or \
git rev-parse --short HEAD; or return
end 2>/dev/null | sed -e 's|^refs/heads/||'
end