plugins for wvkbd using swipeGuess
predictor: more generic space-splitting
support else"where in" case
Zach DeCook 2022-05-17
parent 7a2afa7 · commit 63d5759
-rwxr-xr-xpredictor.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/predictor.sh b/predictor.sh
index 0a5a932..56fc535 100755
--- a/predictor.sh
+++ b/predictor.sh
@@ -12,10 +12,11 @@ saveWord(){
IFS=''
while read -r word; do
echo "$word"
- if test "${word:0:1}" = " "; then
+ if echo "$word" |grep -q " "; then
+ printf %s "$word" | cut -d' ' -f1 >> "$lw"
printf " " >> "$lw"
mv "$lw" "$tw"
- word="$(printf %s "${word:1}"| tee "$lw")"
+ word="$(printf %s "$word"| cut -d' ' -f2| tee "$lw")"
else
printf %s "$word" >> "$lw"
word="$(cat "$lw")"