From ff7aa3aa7a547c1555aaca435091ce257f465a8c Mon Sep 17 00:00:00 2001 From: Dan Nguyen Date: Wed, 23 Sep 2015 18:22:35 -0500 Subject: [PATCH] Fix handling of stash --- gitstatus.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitstatus.sh b/gitstatus.sh index 03e1bc1..57876f7 100755 --- a/gitstatus.sh +++ b/gitstatus.sh @@ -40,7 +40,7 @@ if [[ "$__GIT_PROMPT_IGNORE_STASH" = "1" ]]; then else stash_file="`git rev-parse --git-dir`/logs/refs/stash" if [[ -e "${stash_file}" ]]; then - num_stashed=`cat "${stash_file} | wc -l` + num_stashed=`wc -l "${stash_file}" | cut -d' ' -f1` else num_stashed=0 fi