.dotfiles/.config/fish/functions/__git.current_branch.fish

7 lines
200 B
Fish
Raw Normal View History

2024-10-21 20:46:27 +03:00
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