diff options
| author | Zach DeCook <zachdecook@librem.one> | 2022-05-16 18:54:50 -0400 |
|---|---|---|
| committer | Zach DeCook <zachdecook@librem.one> | 2022-05-16 18:54:50 -0400 |
| commit | 5999a2755b44a76c81a729f9eb5972b6a34b27dc (patch) | |
| tree | ba616c28e1bcca4e446517ecd186b434717f5633 | |
| parent | 5c18ac49adea48f0730a13782d20b5095687a3d8 (diff) | |
| download | SwipeBehaviors-5999a2755b44a76c81a729f9eb5972b6a34b27dc.tar.gz | |
predictor: delete lastword on backspace
| -rwxr-xr-x | predictor.sh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/predictor.sh b/predictor.sh index d266f11..f2ad3bb 100755 --- a/predictor.sh +++ b/predictor.sh @@ -36,6 +36,8 @@ while read -r swipe; do grep -i -m 5 "^$word " "$twow" |awk '(1){printf $2; i++}(i<5){printf "\t"}END{print ""}' >> "$sock" rm -f "$lw" fi + elif test "$swipe" = "$(echo -e "\x08")"; then + rm -f "$lw" else printf "$swipe" >> "$lw" fi |
