diff options
| author | Zach DeCook <zachdecook@librem.one> | 2022-05-16 23:47:21 -0400 |
|---|---|---|
| committer | Zach DeCook <zachdecook@librem.one> | 2022-05-16 23:47:21 -0400 |
| commit | 88dbe5d4d781a67c7de6732c56fa86ac22ac8c57 (patch) | |
| tree | d5c74623ba9c95fe41edc69f6f47b1066737a7e5 | |
| parent | 69ab83ab05443c11ca6633cd3ffba088602f5a98 (diff) | |
| download | SwipeBehaviors-88dbe5d4d781a67c7de6732c56fa86ac22ac8c57.tar.gz | |
predictor: backspace lastword
| -rwxr-xr-x | predictor.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/predictor.sh b/predictor.sh index 0ce7b44..ccbb21f 100755 --- a/predictor.sh +++ b/predictor.sh @@ -42,7 +42,8 @@ while read -r swipe; do rm -f "$lw" fi elif test "$swipe" = "$(echo -e "\x08")"; then - rm -f "$lw" + lastword="$(cat "$lw")" + printf %s "$lastword" | sed 's/.$//g' > "$lw" elif test "$swipe" = "$(echo -e "\n")"; then rm -f "$lw" else |
