1 files changed, 2 insertions(+), 1 deletions(-)
M predictor.sh
M predictor.sh => predictor.sh +2 -1
@@ 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