summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDylan Araps <dylan.araps@gmail.com>2019-01-12 19:59:50 +0200
committerDylan Araps <dylan.araps@gmail.com>2019-01-12 19:59:50 +0200
commitfed6fe60638a6e4181755d9afe0177c44f98a37a (patch)
treede02d2d6c9c4977cf752bf0374f62ff4b823d64d
parent476859da467b64321adcdf10543fe1c68739a160 (diff)
general: fix backspace in some terminals
-rwxr-xr-xfff4
1 files changed, 2 insertions, 2 deletions
diff --git a/fff b/fff
index 9348ed4..5d772db 100755
--- a/fff
+++ b/fff
@@ -268,7 +268,7 @@ cmd_line() {
while IFS= read -rsn 1 -p $'\r\e[K'"${1}${cmd_reply}" read_reply; do
case "$read_reply" in
# Backspace.
- $'\177')
+ $'\177'|$'\b')
cmd_reply="${cmd_reply%?}"
;;
@@ -334,7 +334,7 @@ key() {
# 'D' is what BASH sees when the left arrow is pressed ('\e[D').
# '\177' is what BASH sees when the backspace key is pressed.
# '[[ $PWD ]]' If '$PWD' is empty we're at '/', do nothing.
- h|D|$'\177')
+ h|D|$'\177'|$'\b')
# If a search was done, clear the results and open the current dir.
if ((search == 1)); then
open "$PWD"