From aed5267fd167520608e4659dea08e52644d0d141 Mon Sep 17 00:00:00 2001 From: Aaron Gyes Date: Thu, 29 Dec 2016 04:11:23 -0800 Subject: [PATCH] Stringify __fish_git_prompt --- share/functions/__fish_git_prompt.fish | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/share/functions/__fish_git_prompt.fish b/share/functions/__fish_git_prompt.fish index 46ce5b62f..42db81abb 100644 --- a/share/functions/__fish_git_prompt.fish +++ b/share/functions/__fish_git_prompt.fish @@ -472,11 +472,11 @@ set -g ___fish_git_prompt_status_order stagedstate invalidstate dirtystate untra function __fish_git_prompt_informative_status - set -l changedFiles (command git diff --name-status | cut -c 1-2) - set -l stagedFiles (command git diff --staged --name-status | cut -c 1-2) + set -l changedFiles (command git diff --name-status | string match -r \\w) + set -l stagedFiles (command git diff --staged --name-status | string match -r \\w) - set -l dirtystate (math (count $changedFiles) - (count (echo $changedFiles | grep "U")) ^/dev/null) - set -l invalidstate (count (echo $stagedFiles | grep "U")) + set -l dirtystate (math (count $changedFiles) - (count (echo $changedFiles | string match -r "U")) ^/dev/null) + set -l invalidstate (count (echo $stagedFiles | string match -r "U")) set -l stagedstate (math (count $stagedFiles) - $invalidstate ^/dev/null) set -l untrackedfiles (command git ls-files --others --exclude-standard | wc -l | string trim)