diff options
author | ache <ache@ache.one> | 2023-01-27 02:16:13 +0100 |
---|---|---|
committer | ache <ache@ache.one> | 2023-01-27 02:16:13 +0100 |
commit | 0711e51e83ea671d2c09208c1b6548741ed2c246 (patch) | |
tree | 3271c54d00fff028528c363d590e18a3b76eee00 /functions | |
parent | Git commit amend is so usefull. 🙏 (diff) |
Improove status prompt
Diffstat (limited to 'functions')
-rw-r--r-- | functions/fish_prompt.fish | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/functions/fish_prompt.fish b/functions/fish_prompt.fish index 49e7383..7557389 100644 --- a/functions/fish_prompt.fish +++ b/functions/fish_prompt.fish @@ -170,14 +170,14 @@ function prompt_git -d "Display the current git state" if [ -e .git ] set ref (command git symbolic-ref HEAD 2> /dev/null) if [ $status -gt 0 ] - set -l branch (command git show-ref --head -s --abbrev |head -n1 2> /dev/null) + set -l branch (command git show-ref --head -s --abbrev 2> /dev/null |head -n1 2> /dev/null) set ref "➦ $branch " end set branch_symbol \uE0A0 set -l branch (echo $ref | sed "s-refs/heads/-$branch_symbol -") set dirty '' - set gstatus ( git status --porcelain -b | git_status_summary ) + set gstatus ( git status --porcelain -b 2> /dev/null | git_status_summary ) # Check for commit ahead set ahead (echo $gstatus | cut -d ';' -f 1) |