I want to enable some common key bindings for t/csh on my dedicated server (freebsd 11 rel) but noticed some really weird behavior!
Let me explain the situation. My .cshrc follows
Those two lines in red, work fine when entered manually from csh command line or running source .cshrc but not working automatically when log in shell.
That's really weird, because .cshrc is parsed normally, all other commands executed including the rest bindings, everything works except those two lines!
Please give some advice because I'm really confused! If those bindings were not supported by terminal why they work fine when entering them from command line or manually sourcing .cshrc?
PS: terminal is xterm accessed via putty. Also tried others with exactly the same results.
Thank you folks!
Let me explain the situation. My .cshrc follows
Code:
umask 22
set path = (/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin $HOME/bin)
setenv EDITOR vi
setenv PAGER less
setenv LESS -iM
setenv BLOCKSIZE K
setenv NCURSES_NO_UTF8_ACS 1
setenv CLICOLOR 1
if ($?prompt) then
# An interactive shell -- set some stuff up
set prompt = "%N:%~ %# "
set promptchars = "%#"
set filec
set history = 5000
set savehist = (5000 merge)
set autolist = ambiguous
# Use history to aid expansion
set autoexpand
set autorehash
set mail = (/var/mail/$USER)
if ( $?tcsh ) then
bindkey "^W" backward-delete-word
bindkey -k up history-search-backward
bindkey -k down history-search-forward
bindkey "\e[1~" beginning-of-line
bindkey "\e[4~" end-of-line
bindkey "\e[3~" delete-char
[color=red]bindkey "^[[OC" forward-word
bindkey "^[[OD" backward-word[/color]
endif
endif
Those two lines in red, work fine when entered manually from csh command line or running source .cshrc but not working automatically when log in shell.
That's really weird, because .cshrc is parsed normally, all other commands executed including the rest bindings, everything works except those two lines!
Please give some advice because I'm really confused! If those bindings were not supported by terminal why they work fine when entering them from command line or manually sourcing .cshrc?
PS: terminal is xterm accessed via putty. Also tried others with exactly the same results.
Thank you folks!