plugins for wvkbd using swipeGuess
predictor: more generic space-splitting
support else"where in" case
| -rwxr-xr-x | predictor.sh | 5 |
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")" |