From bd93a9e6ff0376a487a6a5032e05353c1f79691f Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Thu, 29 Dec 2016 13:49:21 +0100 Subject: [PATCH] Remove useless-use-of-echo in git_prompt --- share/functions/__fish_git_prompt.fish | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/functions/__fish_git_prompt.fish b/share/functions/__fish_git_prompt.fish index 42db81abb..0a98f4fd8 100644 --- a/share/functions/__fish_git_prompt.fish +++ b/share/functions/__fish_git_prompt.fish @@ -475,8 +475,8 @@ function __fish_git_prompt_informative_status 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 | string match -r "U")) ^/dev/null) - set -l invalidstate (count (echo $stagedFiles | string match -r "U")) + set -l dirtystate (math (count $changedFiles) - (count (string match -r "U" -- $changedFiles)) ^/dev/null) + set -l invalidstate (count (string match -r "U" -- $stagedFiles)) set -l stagedstate (math (count $stagedFiles) - $invalidstate ^/dev/null) set -l untrackedfiles (command git ls-files --others --exclude-standard | wc -l | string trim)