linux - Home/End keys do not work in tmux -


i'm using tmux xterm-256color $term variable. when in bash under tmux, pressing home/end insert tilde characters (~). outside of tmux home/end keys work fine.

using cat , tput, see there mismatch between generated , expected sequences:

$ cat -v # pressing home, end ^[[1~^[[4~ $ tput khome | cat -v; echo ^[oh $ tput kend | cat -v; echo ^[of 

to fix this, decided add following .bashrc:

if [[ -n "$tmux" ]];     bind '"\e[1~":"\eoh"'     bind '"\e[4~":"\eof"' fi 

that fixed problem bash, in other readline programs, such within repl such ipython, still inserts tilde home/end.

why problem in first place? why generated sequence different when i'm inside tmux vs outside it? how can fix it's not issue in programs?

it appears main problem using xterm-256color $term. switched $term screen-256color , problem went away.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -