Guest

.bashrc

By: nstickney on Mar 21st, 2011  |  syntax: None  |  size: 1.39 KB  |  hits: 324  |  expires: Never
download  |  raw  |  embed  |  report abuse
Copied
  1. #
  2. # ~/.bashrc
  3. #
  4.  
  5. # Vim
  6. alias vi='vim'
  7.  
  8. # Pacman
  9. alias pac='sudo bauerbill --aur'
  10.  
  11. # Colors
  12. ## ls
  13. alias ls='ls --color=auto'
  14. eval $(dircolors -b)
  15. ## grep
  16. export GREP_COLOR="1;33"
  17. alias grep='grep --color=auto'
  18.  
  19. # more is less
  20. alias more='less'
  21.  
  22. # man - colored, and with help
  23. man() {
  24.  env \
  25.   LESS_TERMCAP_mb=$(printf "\e[1;32m") \
  26.   LESS_TERMCAP_md=$(printf "\e[1;33m") \
  27.   LESS_TERMCAP_me=$(printf "\e[0m") \
  28.   LESS_TERMCAP_se=$(printf "\e[0m") \
  29.   LESS_TERMCAP_so=$(printf "\e[1;45;30m") \
  30.   LESS_TERMCAP_ue=$(printf "\e[0m") \
  31.   LESS_TERMCAP_us=$(printf "\e[0;34m") \
  32.    man "$@" || (help $@ 2> /dev/null && help $@ | less)
  33. }
  34.  
  35. # Avoid duplicates
  36. export HISTCONTROL=ignoredups
  37.  
  38. # Bash Prompt
  39. PS1='\[\e[0;31m\]\u\[\e[m\]@\[\e[0;32m\]\h\[\e[m\]:\[\e[0;34m\]\w\[\e[m\] \[\e[0;32m\]\$\[\e[m\] '
  40. PS2='> '
  41. PS3='> '
  42. PS4='+ '
  43.  
  44. # Command
  45. command cat ~/Dropbox/Verses/`expr $RANDOM % 21`.txt | fold -w50 -s && echo
  46.  
  47. case ${TERM} in
  48.   xterm*|rxvt*|Eterm|aterm|kterm|gnome*)
  49.     PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"'
  50.                                                        
  51.     ;;
  52.   screen)
  53.     PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033_%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"'
  54.     ;;
  55. esac
  56.  
  57. [ -r /etc/bash_completion   ] && . /etc/bash_completion