ref: 58f33a1efa079c43b408865d45c90123dbba17d4
parent: cb4e51300a31d7b075f00d11325e3fe60fb4cc71
author: Halfwit <michaelmisch1985@gmail.com>
date: Wed Apr 19 18:24:16 PDT 2017
Make sure we quote properly. - Halfwit Signed-off-by: Halfwit <michaelmisch1985@gmail.com>
--- a/gitbar
+++ b/gitbar
@@ -7,14 +7,14 @@
pull=0
while IFS="⇄↑↓" read -r input; do
- case $input in
- *⇄*) comm=`echo $input | tr -cd [:digit:]` ;;
- *↑*) push=`echo $input | tr -cd [:digit:]` ;;
- *↓*) pull=`echo $input | tr -cd [:digit:]` ;;
+ case "$input" in
+ *⇄*) comm=`echo "$input" | tr -cd [:digit:]` ;;
+ *↑*) push=`echo "$input" | tr -cd [:digit:]` ;;
+ *↓*) pull=`echo "$input" | tr -cd [:digit:]` ;;
esac
done < $GITBAR
-case $1 in
+case "$1" in
commit) comm=`commit wc` ;;
pull) pull=`pull wc` ;;
push) push=`push wc` ;;