about summary refs log tree commit diff
path: root/sb_predictor.sh
diff options
context:
space:
mode:
authorZach DeCook <zachdecook@librem.one>2022-12-01 18:50:51 -0500
committerZach DeCook <zachdecook@librem.one>2022-12-01 18:51:21 -0500
commit9a3212a2dea813581347efd58810bc16d371cda7 (patch)
tree1f4b08468d46de9546d3e2460915566241788ffa /sb_predictor.sh
parent69f266c9c978f3485341a94d332a4005c59f7ea3 (diff)
downloadSwipeBehaviors-9a3212a2dea813581347efd58810bc16d371cda7.tar.gz
predictor: make strictly posix compliant
Diffstat (limited to 'sb_predictor.sh')
-rwxr-xr-xsb_predictor.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/sb_predictor.sh b/sb_predictor.sh
index 6059ce0..1cae0dd 100755
--- a/sb_predictor.sh
+++ b/sb_predictor.sh
@@ -31,7 +31,7 @@ typeSomehow(){
 	IFS=''
 	while read -r word; do
 		if test -e "$complete"; then
-			test -n "${word:1}" && wl-ime-type -- "${word:1}"
+			test -n "${word#?}" && wl-ime-type -- "${word#?}"
 		else
 			wl-ime-type -- "$word"
 		fi
@@ -40,7 +40,7 @@ typeSomehow(){
 cat 0<> "$sock"|suggpicker 2>/dev/null|saveWord | typeSomehow &
 IFS=''
 while read -r swipe; do
-	if test -n "${swipe:1}"; then
+	if test -n "${swipe#?}"; then
 		touch "$complete"
 		# TODO: change words
 		echo "$swipe" | swipeGuess "$words" 5 >> "$sock"