Skip to content

Commit 33c19b2

Browse files
authored
Merge pull request magicmonty#278 from tessus/fix_277
fixes magicmonty#277, substring expression < 0 issue for older bash versions
2 parents 606237f + 307d464 commit 33c19b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gitstatus.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ while IFS='' read -r line || [[ -n "$line" ]]; do
4444
\ ) ;;
4545
*) ((num_staged++)) ;;
4646
esac
47-
status=${status:0:-1}
47+
status=${status:0:(${#status}-1)}
4848
done
4949
done <<< "$gitstatus"
5050

0 commit comments

Comments
 (0)