1
0
Fork 0
mirror of https://github.com/Phantop/dotfiles synced 2024-11-13 02:12:44 +00:00
dotfiles/.config/fish/fisher/functions/_pure_prompt_git_dirty.fish

13 lines
421 B
Fish

function _pure_prompt_git_dirty
set --local git_dirty_symbol
set --local git_dirty_color
set --local is_git_dirty (command git status --porcelain --ignore-submodules 2>/dev/null)
if test -n "$is_git_dirty" # untracked or un-commited files
set git_dirty_symbol "$pure_symbol_git_dirty"
set git_dirty_color "$pure_color_git_dirty"
end
echo "$git_dirty_color$git_dirty_symbol"
end