diff options
author | ache <ache@ache.one> | 2019-01-19 11:59:19 +0100 |
---|---|---|
committer | ache <ache@ache.one> | 2019-01-19 12:37:23 +0100 |
commit | 7a13d046ab29ca5a4b803e827ac48fd082b3f63b (patch) | |
tree | b22f5e64f908e2bfdb9ba4cc7d57ee545a597f5a /functions | |
parent | Config with GO and JS support (diff) |
awk POSIX
Diffstat (limited to 'functions')
-rw-r--r-- | functions/fish_prompt.fish | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/functions/fish_prompt.fish b/functions/fish_prompt.fish index b66528a..01968c9 100644 --- a/functions/fish_prompt.fish +++ b/functions/fish_prompt.fish @@ -1,4 +1,3 @@ - # Set these options in your config.fish (if you want to :]) # # set -g theme_display_user yes @@ -159,11 +158,13 @@ function git_status_summary -d "Deal with git status --porcelain" } { if (!after_first && $0 ~ /^##.+/) { - if ( match($0, /ahead ([1-9]+)/, a) ) { - ahead=a[1]; + if ( match($0, /ahead ([1-9]+)/) ) { + split(substr($0, RSTART, RLENGTH), A); + ahead=A[2]; } - if ( match($0, /behind ([1-9]+)/, a) ) { - behind=a[1]; + if ( match($0, /behind ([1-9]+)/) ) { + split(substr($0, RSTART, RLENGTH), A); + behind=A[2]; } } else if ($0 ~ /^\?\? .+/) { untracked += 1 |