Сегодня обнаружил, что терминал под именем ncmpcpp наследует настройки из ~/.Xdefaults для терминала urxvt. я не знаю почему так, но это - факт. соотвественно после того, как я закомментировал строчки
Код: Выделить всё
URxvt*keysym.Home: \033[1~
URxvt*keysym.End: \033[4~
наряду с
Код: Выделить всё
!ncmpcpp*keysym.Home: \033[7~
!ncpmcpp*keysym.End: \033[8~
home и end стали работать в ncmpcpp(если оставить в одном из мест, то не работают)
но после того, как я закомментировал эти строки, перестали работать home и end в zsh.
по-моему тут уже пахнет клиникой.
может, кто-нибудь покажет свои настройки, или укажет на ошибку в моих?
вот ~/.Xdefaults:
Код:
Xcursor.theme: Vanilla-DMZ
urxvt*font: xft:monospace:pixelsize=12
urxvt*borderLess: false
urxvt*externalBorder: 0
urxvt*internalBorder: 1
urxvt*scrollBar: false
urxvt*depth: 32
urxvt*background: #d5d5d5
urxvt*foreground: #000000
urxvt*cursorColor: #000000
urxvt*cursorColor2: #ffffff
urxvt*cursorBlink: true
urxvt*inheritPixmap: false
urxvt*saveLines: 15000
urxvt*scrollstyle: rxvt
urxvt*scrollTtyOutput: true
!urxvt*scrollTtyKeypress: true
urxvt*mouseWheelScrollPage: false
urxvt*cutchars: `'",;@&*=|?()<>[]{}
URxvt.urlLauncher: firefox
urxvt*visualBell: false
urxvt*transparent: on
!URxvt*keysym.Home: \033[1~
!URxvt*keysym.End: \033[4~
URxvt.keysym.Shift-Up: command:\033]720;1\007
URxvt.keysym.Shift-Down: command:\033]721;1\007
ncmpcpp*font: xft:monospace:pixelsize=12
ncmpcpp*borderLess: false
ncmpcpp*externalBorder: 0
ncmpcpp*internalBorder: 1
ncmpcpp*scrollBar: false
ncmpcpp*depth: 32
ncmpcpp*background: #d5d5d5
ncmpcpp*foreground: #000000
ncmpcpp*cursorColor: #000000
ncmpcpp*cursorColor2: #ffffff
ncmpcpp*cursorBlink: true
ncmpcpp*inheritPixmap: false
ncmpcpp*saveLines: 15000
ncmpcpp*scrollTtyOutput: false
ncmpcpp*scrollTtyKeypress: true
ncmpcpp*mouseWheelScrollPage: false
ncmpcpp*cutchars: `'",;@&*=|?()<>[]{}
ncmpcpp.urlLauncher: firefox
ncmpcpp*visualBell: false
ncmpcpp*transparent: on
!ncmpcpp*keysym.Home: \033[7~
!ncpmcpp*keysym.End: \033[8~
mutt*font: xft:monospace:pixelsize=12
mutt*borderLess: false
mutt*externalBorder: 0
mutt*internalBorder: 1
mutt*scrollBar: false
mutt*depth: 32
mutt*background: #d5d5d5
mutt*foreground: #000000
mutt*cursorColor: #000000
mutt*cursorColor2: #ffffff
mutt*cursorBlink: true
mutt*inheritPixmap: false
mutt*saveLines: 15000
mutt*scrollTtyOutput: false
mutt*scrollTtyKeypress: true
mutt*mouseWheelScrollPage: false
mutt*cutchars: `'",;@&*=|?()<>[]{}
mutt.urlLauncher: firefox
mutt*visualBell: false
mutt*transparent: on
mutt*keysym.Home: \033[7~
mutt*keysym.End: \033[8~
xpdf*Background: #d5d5d5
! Black
*color0: #2E3436
*color8: #555753
! Red
*color1: #CC0000
*color9: #EF2929
! Green
*color2: #15a50e
*color10: #46a142
! Yellow
*color3: #C4A000
*color11: #FCE94F
! Blue
*color4: #3465A4
*color12: #729FCF
! Purple
*color5: #75507B
*color13: #AD7FA8
! Cyan
*color6: #06989A
*color14: #34E2E2
! White
*color7: #D3D7CF
*color15: #EEEEEC
~/.zshrc:
Код:
# zsh line editing
: ${ZSHEDIT:="emacs"}
#: ${TERM:=rxvt-unicode}
if [[ "$ZSHEDIT" == "vim" ]] then
bindkey -v
else
bindkey -e
bindkey "^[ " magic-space
bindkey "^[!" expand-history
fi
# Environment
HISTSIZE=10000
HISTFILE=${HOME}/.zsh_history
SAVEHIST=10000
# Prompt on the right side. zsh feature
#RPROMPT="[%T]"
# kill autocomplete
zstyle ':completion:*:processes' command 'ps -x'
zstyle ':completion:*:processes' sort false
zstyle ':completion:*:processes-names' command 'ps xho command'
#global aliases
alias -g L='| less'
alias -g G='| grep'
alias -g GI='|grep -i'
alias -g H='| head'
alias -g T='| tail'
alias -g S='| sort'
alias -g SU='|sort -u'
alias -g WC='| wc -l'
alias -g dict='dict -d ru-en--en-ru'
alias -g my_mail='fetchmail -av -m "/usr/bin/procmail -d %T"'
alias -g halt='sudo halt'
alias -g reboot='sudo reboot'
#alias -g mount='sudo mount'
#alias -g umount='sudo umount'
#ext aliases
#video
alias -s avi=mplayer
alias -s mpg=mplayer
alias -s mpeg=mplayer
alias -s wmv=mplayer
alias -s flv=mplayer
alias -s asf=mplayer
alias -s mov=mplayer
alias -s mkv=mplayer
#audio
alias -s mp3=mplayer
alias -s MP3=mplayer
alias -s ogg=mplayer
alias -s wav=mplayer
#office
alias -s doc=oowriter
alias -s DOC=oowriter
alias -s odt=oowriter
alias -s ODT=oowriter
alias -s rtf=oowriter
alias -s RTF=oowriter
alias -s xls=oocalc
alias -s XLS=oocalc
alias -s ods=oocalc
alias -s ODS=oocalc
#pdf,djvu
alias -s pdf=kpdf
alias -s djvu=djview
#guitapro
alias -s gp3=/opt/tuxguitar/tuxguitar
alias -s gp4=/opt/tuxguitar/tuxguitar
alias -s gp5=/opt/tuxguitar/tuxguitar
alias -s tg=/opt/tuxguitar/tuxguitar
#pictures
alias -s jpg=gthumb
alias -s jpeg=gthumb
alias -s JPG=gthumb
alias -s JPEG=gthumb
alias -s gif=gthumb
alias -s GIF=gthumb
alias -s PNG=gthumb
alias -s png=gthumb
alias -s xpm=gthumb
alias -s xcf=gthumb
#HTML
alias -s html=opera
alias -s htm=opera
alias -s shtml=opera
#tar
alias -s bz2="tar -xf"
alias -s gz="tar -xf"
alias -s zip="unzip -q"
alias -s rar="unrar x"
alias -s 7z="7z x"
# Set/unset shell options
setopt globdots nocorrect pushdtohome autolist nopromptcr
setopt nocorrectall autocd recexact longlistjobs
setopt histignoredups pushdsilent appendhistory histexpiredupsfirst
setopt autopushd pushdminus extendedglob rcquotes
unsetopt bgnice autoparamslash hup
# Setup some basic programmable completions. To see more examples
# of these, check out /usr/doc/packages/zsh/compctl-examples.
# You you have a slow machine, you might want to comment the lines below
# with compctl in, and comment the below two lines out.
#
# compctl -g '*(-/)' cd pushd
# compctl -g '*(/)' rmdir dircmp
# compctl -j -P % -x 's[-] p[1]' -k signals -- kill
# compctl -j -P % fg bg wait jobs disown
# compctl -A shift
# compctl -caF type whence which
# compctl -F unfunction
# compctl -a unalias
# compctl -v unset typeset declare vared readonly export integer
# compctl -e disable
# compctl -d enable
#
# The default way is the usage of the zsh built-in completer
# Comment the two below lines out, if you are on a slow machine, and
# comment the above compctl lines in.
autoload -U compinit
compinit
# Completion so "cd ..<TAB>" -> "cd ../"
# zstyle ':completion:*' special-dirs ..
# Online help
unalias run-help 2>/dev/null || true
autoload run-help
# Don't use zsh builtin which
alias which >/dev/null && unalias which
# Common standard keypad and cursor
bindkey "^[[2~" yank
bindkey "^[[3~" delete-char
# History completion on pgup and pgdown
autoload -U history-search-end
zle -N history-beginning-search-backward-end history-search-end
zle -N history-beginning-search-forward-end history-search-end
bindkey "^[[5~" history-beginning-search-backward-end
bindkey "^[[6~" history-beginning-search-forward-end
if [[ "$TERM" == "xterm" ]] then
bindkey "^[2;5~" yank
bindkey "^[3;5~" delete-char
bindkey "^[5;5~" up-history
bindkey "^[6;5~" down-history
fi
bindkey "^[[C" forward-char
bindkey "^[[D" backward-char
#bindkey "^[[A" up-history
#bindkey "^[[B" down-history
bindkey "^[[A" history-beginning-search-backward
bindkey -a "^[[A" history-beginning-search-backward
bindkey "^[[B" history-beginning-search-forward
bindkey -a "^[[B" history-beginning-search-forward
# 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
bindkey "^?" backward-delete-char
bindkey "^H" backward-delete-char
# Home and End
if [[ "$TERM" == "rxvt-unicode" ]] then
bindkey "^[[7~": beginning-of-line
bindkey "^[[8~": end-of-line
else
if [[ "$TERM" == "xterm" ]] then
# Normal keypad and cursor of xterm
bindkey "^[[1~" history-search-backward
bindkey "^[[4~" set-mark-command
bindkey "^[[H" beginning-of-line
bindkey "^[[F" end-of-line
# Home and End of application keypad and cursor of xterm
bindkey "^[OH" beginning-of-line
bindkey "^[OF" end-of-line
bindkey "^[O5H" beginning-of-line
bindkey "^[O5F" end-of-line
else
if [[ "$TERM" == "kvt" ]] then
bindkey "^[[1~" history-search-backward
bindkey "^[[4~" set-mark-command
bindkey "^[OH" beginning-of-line
bindkey "^[OF" end-of-line
else
# TERM=linux or console
bindkey "^[[1~" beginning-of-line
bindkey "^[[4~" end-of-line
fi
fi
fi
# Application keypad and cursor of xterm
if [[ "$TERM" == "xterm" ]] then
bindkey "^[OD" backward-char
bindkey "^[OC" forward-char
bindkey "^[OA" up-history
bindkey "^[OB" down-history
# DEC keyboard KP_F1 - KP_F4
bindkey -s "^[OP" "^["
bindkey "^[OQ" undo
bindkey "^[OR" undefined-key
bindkey "^[OS" kill-line
fi
if [[ "$TERM" == "gnome" ]] then
# or gnome terminal F1 - F4
bindkey -s "^[OP" "^["
bindkey "^[OQ" undo
bindkey "^[OR" undefined-key
bindkey "^[OS" kill-line
fi
# Function keys F1 - F12
if [[ "$TERM" == "linux" ]] then
# On console the first five function keys
bindkey "^[[[A" undefined-key
bindkey "^[[[B" undefined-key
bindkey "^[[[C" undefined-key
bindkey "^[[[D" undefined-key
bindkey "^[[[E" undefined-key
else
# The first five standard function keys
bindkey "^[[11~" undefined-key
bindkey "^[[12~" undefined-key
bindkey "^[[13~" undefined-key
bindkey "^[[14~" undefined-key
bindkey "^[[15~" undefined-key
fi
bindkey "^[[17~" undefined-key
bindkey "^[[18~" undefined-key
bindkey "^[[19~" undefined-key
bindkey "^[[20~" undefined-key
bindkey "^[[21~" undefined-key
# Note: F11, F12 are identical with Shift_F1 and Shift_F2
bindkey "^[[23~" undefined-key
bindkey "^[[24~" undefined-key
# Shift Function keys F1 - F12
# identical with F11 - F22
#
# bindkey "^[[23~" undefined-key
# bindkey "^[[24~" undefined-key
bindkey "^[[25~" undefined-key
bindkey "^[[26~" undefined-key
# DEC keyboard: F15=^[[28~ is Help
bindkey "^[[28~" undefined-key
# DEC keyboard: F16=^[[29~ is Menu
bindkey "^[[29~" undefined-key
bindkey "^[[31~" undefined-key
bindkey "^[[32~" undefined-key
bindkey "^[[33~" undefined-key
bindkey "^[[34~" undefined-key
if [[ "$TERM" == "xterm" ]] then
# Not common
bindkey "^[[35~" undefined-key
bindkey "^[[36~" undefined-key
fi
if [[ "$TERM" == "xterm" ]] then
# Application keypad and cursor of xterm
# with NumLock ON
#
# Operators
bindkey -s "^[Oo" "/"
bindkey -s "^[Oj" "*"
bindkey -s "^[Om" "-"
bindkey -s "^[Ok" "+"
bindkey -s "^[Ol" ","
bindkey -s "^[OM" "\n"
bindkey -s "^[On" "."
# Numbers
bindkey -s "^[Op" "0"
bindkey -s "^[Oq" "1"
bindkey -s "^[Or" "2"
bindkey -s "^[Os" "3"
bindkey -s "^[Ot" "4"
bindkey -s "^[Ou" "5"
bindkey -s "^[Ov" "6"
bindkey -s "^[Ow" "7"
bindkey -s "^[Ox" "8"
bindkey -s "^[Oy" "9"
fi
# EMACS line editing
if [[ "$ZSHEDIT" == "emacs" ]] then
# ... xterm application cursor
if [[ "$TERM" == "xterm" ]] then
bindkey "^[^[OD" backward-word
bindkey "^[^[OC" forward-word
bindkey "^[^[OA" up-history
bindkey "^[^[OB" down-history
bindkey "^^[OD" backward-char
bindkey "^^[OC" forward-char
bindkey "^^[OA" up-history
bindkey "^^[OB" down-history
fi
# Standard cursor
bindkey "^[^[[D" backward-word
bindkey "^[^[[C" forward-word
bindkey "^[^[[A" up-history
bindkey "^[^[[B" down-history
bindkey "^^[[D" backward-char
bindkey "^^[[C" forward-char
bindkey "^^[[A" up-history
bindkey "^^[[B" down-history
fi
Добавлено: все-таки заставил работать клавиши end и home везде, где надо. но так и не понял, что за хрень с ними...