Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

home, end, delete, pageup, pagedown with ksh

I want to use home, end, delete, pageup, pagedown with ksh. My TERM is xterm-color. These keys works fine with tcsh and zsh, but not with ksh (print a tilde ~)

I found this:

bind '^[[3'=prefix-2
bind '^[[3~'=delete-char-forward
bind '^[[1'=prefix-2
bind '^[[1~'=beginning-of-line
bind '^[[4'=prefix-2
bind '^[[4~'=end-of-line

But when I set one bindkey, the last does not work anymore.

How can I use these keys in ksh with a .kshrc ?

Thanks.

like image 204
Nicolas Avatar asked Oct 12 '09 21:10

Nicolas


1 Answers

Have you got the EDITOR or VISUAL variables set? If not, that may be the way forward.

  EDITOR=vi

may be sufficient.

like image 126
martin clayton Avatar answered Nov 06 '22 22:11

martin clayton