dot.tcshrc 1.19 KB
Newer Older
Jørn Åne's avatar
Jørn Åne committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
# .tcshrc

if ( -f .cshrc ) source .cshrc

alias ll ls -ahl

alias .. cd ..
alias ... cd ../..
alias .... cd ../../..
alias ..... cd ../../../..
alias ...... cd ../../../../..
alias ....... cd ../../../../../..
alias ........ cd ../../../../../../..
alias ......... cd ../../../../../../../..

setenv PAGER less
setenv EDITOR vim
setenv VISUAL less

# bind keypad keys for console, vt100, vt102, xterm
bindkey "\e[1~" beginning-of-line  # Home
bindkey "\e[2~" overwrite-mode     # Ins
bindkey "\e[3~" delete-char	# Delete
bindkey "\e[4~" end-of-line	# End
bindkey "\e[5C" forward-word
bindkey "\e[5D" backward-word
bindkey "\e[1;5C" forward-word
bindkey "\e[1;5D" backward-word

# for rxvt
bindkey "\e[7~" beginning-of-line  # Home rxvt
bindkey "\e[8~" end-of-line	# End rxvt

# for non RH/Debian xterm, can't hurt for RH/DEbian xterm
bindkey "\eOH" beginning-of-line
bindkey "\eOF" end-of-line

# for freebsd console
bindkey "\e[H" beginning-of-line
bindkey "\e[F" end-of-line

if ($?prompt) then
	if (-x /usr/bin/id && `/usr/bin/id -u` == 0) then
		set c_path="37;41"
		set b_prompt='# '
	else
		set c_path="37;44"
		set b_prompt='%% '
	endif
	set prompt="\n%B%n%b@%m:%B%{\033[${c_path}m%}%~%b\n${b_prompt}"
endif