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.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