Skip to content

Instantly share code, notes, and snippets.

@libcrack
Created June 30, 2015 23:26
Show Gist options
  • Save libcrack/2c4c38973511c554bccd to your computer and use it in GitHub Desktop.
Save libcrack/2c4c38973511c554bccd to your computer and use it in GitHub Desktop.
FreeBSD 10 .cshrc additional stuff
# Home, End y Delete
bindkey "\e[1~" beginning-of-line # Home
bindkey "\e[7~" beginning-of-line # Home rxvt
bindkey "\e[2~" overwrite-mode # Ins
bindkey "\e[3~" delete-char # Delete
bindkey "\e[4~" end-of-line # End
bindkey "\e[8~" end-of-line # End rxvt
# reverse search Ctrl+r
bindkey "^R" i-search-back
# Ctrl+izq/dcha para moverte entre palabras
bindkey "^[[1;5D" backward-word
bindkey "^[[1;5C" forward-word
# enviroment
setenv EDITOR vim
setenv PAGER less
# colors
set autolist set color set colorcat
setenv CLICOLOR "true"
setenv LSCOLORS "exfxcxdxbxegedabagacad"
set rgb_restore = '%{^[[00m%}'
set rgb_black = '%{^[[00;30m%}'
set rgb_firebrick = '%{^[[00;31m%}'
set rgb_red = '%{^[[01;31m%}'
set rgb_forest = '%{^[[00;32m%}'
set rgb_green = '%{^[[01;32m%}'
set rgb_brown = '%{^[[00;33m%}'
set rgb_yellow = '%{^[[01;33m%}'
set rgb_navy = '%{^[[00;34m%}'
set rgb_blue = '%{^[[01;34m%}'
set rgb_purple = '%{^[[00;35m%}'
set rgb_magenta = '%{^[[01;35m%}'
set rgb_cadet = '%{^[[00;36m%}'
set rgb_cyan = '%{^[[01;36m%}'
set rgb_gray = '%{^[[00;37m%}'
set rgb_white = '%{^[[01;37m%}'
# system prompt
set prompt = "%{\033[0;1;37m%}%n%{\033[0;1;31m%}@%{\033[0;1;37m%}%m%{\033[0;1;33m%}:%{\033[0;1;32m%}%b%/%{\033[0;1;0m%} %# "
alias psjail ps -o pid,jid -awux
# jail prompt
sysctl security.jail.jailed | grep -q 1 \
&& set prompt = "%{\033[0;1;37m%}(%{\033[0;1;31m%}jail %m%{\033[0;1;37m%})%{\033[0;1;33m%}:%{\033[0;1;32m%}%b%/%{\033[0;1;0m%} %# "
# titulo xterm
alias settitle printf '"\033]2;\!*\a\033]1;\!*\a\033]0;\!*\a"'
if ( "$TERM" == "xterm" ) then
set PROMPT_COMMAND = 'printf "%{\033[0;1;37m%}%n%{\033[0;1;31m%} @ %{\033[0;1;37m%}%m%{\033[0;1;33m%}:%{\033[0;1;32m%}%~%{\033[0;1;0m%} %# "'
settitle $user@$HOSTNAME : $cwd
endif
source autocshscreen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment