From 0711e51e83ea671d2c09208c1b6548741ed2c246 Mon Sep 17 00:00:00 2001 From: ache Date: Fri, 27 Jan 2023 02:16:13 +0100 Subject: Improove status prompt --- functions/fish_prompt.fish | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'functions') 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) -- cgit v1.2.3