sh(1): fix home/del key on mobaxterm env

For $reason mobaxterm default on sending unusual sequence from home/del
key, which makes libedit unabel to catch them and bind them correctly.

mobaxterm seems popular on the windows environment, so add proper
keybinding to default shrc configuration so it works out of box.

Reported by:	lme
This commit is contained in:
Baptiste Daroussin 2021-10-20 13:58:18 +02:00
parent 4fb002805e
commit f3aad18d5e
2 changed files with 8 additions and 0 deletions

View File

@ -40,6 +40,10 @@ bind "\\e[1;5C" em-next-word
bind "\\e[1;5D" ed-prev-word
alias history='fc -l'
# Fix home/del for mobaxterm
bind ^[[5~ ed-move-to-beg
bind ^[[6~ ed-move-to-end
# read(2) of directories may not be desirable by default, as this will provoke
# EISDIR errors from each directory encountered.
# alias grep='grep -d skip'

View File

@ -40,6 +40,10 @@ bind "\\e[1;5C" em-next-word
bind "\\e[1;5D" ed-prev-word
alias history='fc -l'
# Fix home/del for mobaxterm
bind ^[[5~ ed-move-to-beg
bind ^[[6~ ed-move-to-end
# set prompt: ``username@hostname:directory $ ''
PS1="\u@\h:\w \\$ "