Namestio sam tastaturu za xterm i bash.
Exportovao sam terminfo sa linuxa za xterm, i sredio sam inputrc. Sada xterm pod bashom radi kako treba. Za ostale terminale i shellove necu ni da namestam (za sada).
ne znam kako se attachuju fajlovi pa cu da insertujem inputrc i terminfo source fajl.
inputrc:
Code:
################################################################################
## /etc/inputrc
##
## Attempt to put different TERMs together in one readline init file.
## Copyright (c) 1997,2000 SuSE Linux AG, Nuernberg, Germany.
##
## Author: Werner Fink, <
[email protected]>
## Modified by Mipko
##
################################################################################
# TAB completion stuff
TAB: complete
set show-all-if-ambiguous on
#
# Eight bit compatible: Umlaute
#
set meta-flag on
set output-meta on
set convert-meta off
set term xy
#
# VI line editing
#
#set editing-mode vi
#set keymap vi
#
# Common standard keypad and cursor
#
"\e[1~": beginning-of-line
"\e[2~": yank
"\e[3~": delete-char
"\e[4~": end-of-line
"\e[5~": history-search-backward
"\e[6~": history-search-forward
$if term=xterm
"\e[2;5~": yank
"\e[3;5~": delete-char
"\e[5;5~": history-search-backward
"\e[6;5~": history-search-forward
$endif
"\e[C": forward-char
"\e[D": backward-char
"\e[A": previous-history
"\e[B": next-history
$if term=xterm
"\e[E": re-read-init-file
$else
"\e[G": re-read-init-file
$endif
#
# Avoid network problems
# ... \177 (ASCII-DEL) and \010 (ASCII-BS)
# do `backward-delete-char'
# Note: `delete-char' is maped to \033[3~
# Therefore xterm's responce on pressing
# key Delete or KP-Delete should be
# \033[3~ ... NOT \177
#
"\C-?": backward-delete-char
"\C-H": backward-delete-char
#
# Home and End
#
$if term=xterm
#
# Normal keypad and cursor of xterm
#
#"\e[1~": history-search-backward #Mipko
#"\e[4~": set-mark #Mipko
"\e[H": beginning-of-line
"\e[F": end-of-line
# Home and End of application keypad and cursor of xterm
"\eOH": beginning-of-line
"\eOF": end-of-line
"\eO5H": beginning-of-line
"\eO5F": end-of-line
$else
$if term=kvt
"\e[1~": history-search-backward
"\e[4~": set-mark
"\eOH": beginning-of-line
"\eOF": end-of-line
$endif
#
# TERM=linux or console or gnome
#
"\e[1~": beginning-of-line
"\e[4~": end-of-line
$endif
#
# Application keypad and cursor of xterm
#
$if term=xterm
"\eOD": backward-char
"\eOC": forward-char
"\eOA": previous-history
"\eOB": next-history
"\eOE": re-read-init-file
# DEC keyboard KP_F1 - KP_F4 or
# XTerm of XFree86 in VT220 mode F1 - F4
"\eOP": prefix-meta
"\eOQ": undo
"\eOR": "" "\eOS": kill-line
$endif
$if term=gnome
# or gnome terminal F1 - F4
"\eOP": prefix-meta
"\eOQ": undo
"\eOR": ""
"\eOS": kill-line
$endif
#
# Function keys F1 - F12
#
$if term=linux
#
# On console the first five function keys
#
"\e[[A": prefix-meta
"\e[[B": undo
"\e[[C": ""
"\e[[D": kill-line
"\e[[E": ""
$else
#
# The first five standard function keys
#
"\e[11~": prefix-meta
"\e[12~": undo
"\e[13~": ""
"\e[14~": kill-line
"\e[15~": ""
$endif
"\e[17~": ""
"\e[18~": ""
"\e[19~": ""
"\e[20~": ""
"\e[21~": ""
# Note: F11, F12 are identical with Shift_F1 and Shift_F2
"\e[23~": ""
"\e[24~": ""
#
# Shift Function keys F1 - F12
# identical with F11 - F22
#
#"\e[23~": ""
#"\e[24~": ""
"\e[25~": ""
"\e[26~": ""
# DEC keyboard: F15=\e[28~ is Help
"\e[28~": ""
# DEC keyboard: F16=\e[29~ is Menu
"\e[29~": ""
"\e[31~": ""
"\e[32~": ""
"\e[33~": ""
"\e[34~": ""
$if term=xterm
# Not common
"\e[35~": ""
"\e[36~": ""
$endif
#
$if term=xterm
#
# Application keypad and cursor of xterm
# with NumLock ON
#
# Operators
"\eOo": "/"
"\eOj": "*"
"\eOm": "-"
"\eOk": "+"
"\eOl": ","
"\eOM": accept-line
"\eOn": "."
# Numbers
"\eOp": "0"
"\eOq": "1"
"\eOr": "2"
"\eOs": "3"
"\eOt": "4"
"\eOu": "5"
"\eOv": "6"
"\eOw": "7"
"\eOx": "8"
"\eOy": "9"
$endif
#
# EMACS line editing
#
$if mode=emacs
#
# ... xterm application cursor
#
$if term=xterm
"\e\eOD": backward-word
"\e\eOC": forward-word
"\e\eOA": up-history
"\e\eOB": down-history
"\C-\eOD": backward-char
"\C-\eOC": forward-char
"\C-\eOA": up-history
"\C-\eOB": down-history
$endif
#
# Standard cursor
#
"\e\e[D": backward-word
"\e\e[C": forward-word
"\e\e[A": up-history
"\e\e[B": down-history
"\C-\e[D": backward-char
"\C-\e[C": forward-char
"\C-\e[A": up-history
"\C-\e[B": down-history
$endif
#
# end
#
terminfo za xterm:
Code:
# Reconstructed via infocmp from file: /usr/share/lib/terminfo/x/xterm
xterm|xterm terminal emulator (X Window System),
am, bce, km, mc5i, mir, msgr, npc, xenl,
colors#8, cols#80, it#8, lines#24, pairs#64,
acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z,
civis=\E[?25l, clear=\E[H\E[2J, cnorm=\E[?25h, cr=\r,
csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=\b,
cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C,
cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M,
ech=\E[%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K,
enacs=\E(B\E)0, flash=\E[?5h$<100/>\E[?5l, home=\E[H,
hpa=\E[%i%p1%dG, ht=\t, hts=\EH, ich=\E[%p1%d@,
il=\E[%p1%dL, il1=\E[L, ind=\n, invis=\E[8m,
is2=\E[!p\E[?3;4l\E[4l\E>, kDC=\E[3;2~, kEND=\E[1;2F,
kHOM=\E[1;2H, kIC=\E[2;2~, kLFT=\E[1;2D, kNXT=\E[6;2~,
kPRV=\E[5;2~, kRIT=\E[1;2C, kb2=\EOE, kbs=\b,
kcbt=\E[Z, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC,
kcuu1=\EOA, kdch1=\E[3~, kend=\EOF, kent=\EOM,
kf1=\EOP, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~,
kf13=\EO2P, kf14=\EO2Q, kf15=\EO2R, kf16=\EO2S,
kf17=\E[15;2~, kf18=\E[17;2~, kf19=\E[18;2~, kf2=\EOQ,
kf20=\E[19;2~, kf21=\E[20;2~, kf22=\E[21;2~,
kf23=\E[23;2~, kf24=\E[24;2~, kf25=\EO5P, kf26=\EO5Q,
kf27=\EO5R, kf28=\EO5S, kf29=\E[15;5~, kf3=\EOR,
kf30=\E[17;5~, kf31=\E[18;5~, kf32=\E[19;5~,
kf33=\E[20;5~, kf34=\E[21;5~, kf35=\E[23;5~,
kf36=\E[24;5~, kf37=\EO6P, kf38=\EO6Q, kf39=\EO6R,
kf4=\EOS, kf40=\EO6S, kf41=\E[15;6~, kf42=\E[17;6~,
kf43=\E[18;6~, kf44=\E[19;6~, kf45=\E[20;6~,
kf46=\E[21;6~, kf47=\E[23;6~, kf48=\E[24;6~,
kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~,
kf9=\E[20~, khome=\EOH, kich1=\E[2~, kmous=\E[M,
knp=\E[6~, kpp=\E[5~, mc0=\E[i, mc4=\E[4i, mc5=\E[5i,
op=\E[39;49m, rc=\E8, rev=\E[7m, ri=\EM, rmacs=^O,
rmam=\E[?7l, rmcup=\E[?1049l, rmir=\E[4l,
rmkx=\E[?1l\E>, rmso=\E[27m, rmul=\E[24m, rs1=\Ec,
rs2=\E[!p\E[?3;4l\E[4l\E>, sc=\E7, setab=\E[4%p1%dm,
setaf=\E[3%p1%dm,
setb=\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m,
setf=\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m,
sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m%?%p9%t^N%e^O%;,
sgr0=\E[m^O, smacs=^N, smam=\E[?7h, smcup=\E[?1049h,
smir=\E[4h, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m,
tbc=\E[3g, u6=\E[%i%d;%dR, u7=\E[6n, u8=\E[?1;2c,
u9=\E[c, vpa=\E[%i%p1%dd,
Uputstvo
1.
terminfo iskompajlirajte sledecom komandom
Code:
> tic terminfo
ukoliko zelite da vidite neki output koristite switch -v
2.
Ukoliko zelite da svi korisnici po defaultu koriste dati inputrc iskopirajte ga u /etc/inputrc. Ukoliko zelite da taj inputrc bude specifican za usera iskopirajte ga u ~/.inputrc. Meni bas nesto ne radi to /etc/inputrc ako neko zna zasto neka javi. Tako da ja taj inputrc kopiram svakom useru u ~/.inputrc
Nadam se da je ovo nekome pomoglo.
pozd
Mipko