Merge pull request #9 from ogr3/porcelain-sed

Removed sed and cut
master
pedantic79 10 years ago
commit 5293850880
  1. 3
      gitstatus.sh

@ -40,7 +40,8 @@ if [[ "$__GIT_PROMPT_IGNORE_STASH" = "1" ]]; then
else else
stash_file="$( git rev-parse --git-dir )/logs/refs/stash" stash_file="$( git rev-parse --git-dir )/logs/refs/stash"
if [[ -e "${stash_file}" ]]; then if [[ -e "${stash_file}" ]]; then
num_stashed=$( wc -l < "${stash_file}" | tr -s ' ' | cut -d ' ' -f2 ) wc_output=$( wc -l < "${stash_file}" )
num_stashed=${wc_output//[[:space:]]/}
else else
num_stashed=0 num_stashed=0
fi fi

Loading…
Cancel
Save