4 ms·
You can do this in fish with a direct call to git branch, and it’s not slow and doesn’t require catting files: set -l git_branch (git branch 2>/dev/null | se
by tekknik 5y ago
You can do this in fish with a direct call to git branch, and it’s not slow and doesn’t require catting files:
set -l git_branch (git branch 2>/dev/null | sed -n '/\* /s///p')
if test -n "$git_branch"
echo -n -s (set_color yellow) "<$git_branch>" (set_color normal) " "
end