summaryrefslogtreecommitdiff
path: root/functions/fish_prompt.fish
diff options
context:
space:
mode:
Diffstat (limited to 'functions/fish_prompt.fish')
-rw-r--r--functions/fish_prompt.fish4
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)