Ask Your Question
0

How to check which terminal emulator is running? [closed]

asked 2016-01-23 06:42:36 -0600

nielsk gravatar image

I found out that gnome-terminal and urxvt are using different key codes for home and end in zsh. I need for urxvt:

bindkey "^[[1~" beginning-of-line
bindkey "^[[4~" end-of-line

and for gnome-terminal:

bindkey "\e[H" beginning-of-line
bindkey "\e[F" end-of-line

How can I check in .zshrc which terminal emulator is running? $TERM is in both cases xterm-256color

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by nielsk
close date 2016-01-23 06:46:26.393808

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-01-23 06:46:10 -0600

nielsk gravatar image

Just put all four of them into .zshrc

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-01-23 06:42:15 -0600

Seen: 160 times

Last updated: Jan 23 '16