summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorache <ache@ache.one>2019-01-19 11:59:19 +0100
committerache <ache@ache.one>2019-01-19 12:37:23 +0100
commit7a13d046ab29ca5a4b803e827ac48fd082b3f63b (patch)
treeb22f5e64f908e2bfdb9ba4cc7d57ee545a597f5a
parentConfig with GO and JS support (diff)
awk POSIX
-rw-r--r--functions/fish_prompt.fish11
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