Check your current/usual TERM type, so you can check the effect right away:
[ntavares@solaris ~]$ echo $TERM
vt100
This tells you your terminal is setup with vt100 definitions, so copy your 'vt100' terminfo to somewhere so that you can add this specific keystrokes definitions [you should replace 'vt100' for whatever the result above, e.g. 'xterm']:
$ mkdir ~/.util
$ env TERMINFO=/usr/share/lib/terminfo /bin/infocmp vt100 > ~/.util/vt100.ti
$ echo ' knp=\E[6~, kpp=\E[5~, kend=\EOF, khome=\EOH, ' >> ~/.util/vt100.ti
$ env TERMINFO=$HOME/.util /bin/tic -v ~/.util/vt100.ti
Test the keys in a text file (example: /etc/profile):
$ env TERMINFO=$HOME/.util less /etc/profile
It should be working now. Unless you want to change this behaviour system wide — replacing /usr/share/lib/terminfo/x/xterm with your compiled info at ~/.util — you'll need to teach bash to read a different TERMINFO description on login:
$ echo "export TERMINFO=$HOME/.util" >> ~/.profile
Reference:
http://tech.groups.yahoo.com/group/solarisx86/message/20027
Sem comentários:
Enviar um comentário