
.bashrc
By:
nstickney on Mar 21st, 2011 | syntax:
None | size: 1.39 KB | hits: 324 | expires: Never
#
# ~/.bashrc
#
# Vim
alias vi='vim'
# Pacman
alias pac='sudo bauerbill --aur'
# Colors
## ls
alias ls='ls --color=auto'
eval $(dircolors -b)
## grep
export GREP_COLOR="1;33"
alias grep='grep --color=auto'
# more is less
alias more='less'
# man - colored, and with help
man() {
env \
LESS_TERMCAP_mb=$(printf "\e[1;32m") \
LESS_TERMCAP_md=$(printf "\e[1;33m") \
LESS_TERMCAP_me=$(printf "\e[0m") \
LESS_TERMCAP_se=$(printf "\e[0m") \
LESS_TERMCAP_so=$(printf "\e[1;45;30m") \
LESS_TERMCAP_ue=$(printf "\e[0m") \
LESS_TERMCAP_us=$(printf "\e[0;34m") \
man "$@" || (help $@ 2> /dev/null && help $@ | less)
}
# Avoid duplicates
export HISTCONTROL=ignoredups
# Bash Prompt
PS1='\[\e[0;31m\]\u\[\e[m\]@\[\e[0;32m\]\h\[\e[m\]:\[\e[0;34m\]\w\[\e[m\] \[\e[0;32m\]\$\[\e[m\] '
PS2='> '
PS3='> '
PS4='+ '
# Command
command cat ~/Dropbox/Verses/`expr $RANDOM % 21`.txt | fold -w50 -s && echo
case ${TERM} in
xterm*|rxvt*|Eterm|aterm|kterm|gnome*)
PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"'
;;
screen)
PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033_%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"'
;;
esac
[ -r /etc/bash_completion ] && . /etc/bash_completion