diff --git a/gitstatus.sh b/gitstatus.sh index 6d7db3c1..19e3dee7 100755 --- a/gitstatus.sh +++ b/gitstatus.sh @@ -44,7 +44,7 @@ while IFS='' read -r line || [[ -n "$line" ]]; do \ ) ;; *) ((num_staged++)) ;; esac - status=${status:0:-1} + status=${status:0:(${#status}-1)} done done <<< "$gitstatus"