The aptly named.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

88 lines
2.7 KiB

11 years ago
  1. # If not running interactively, don't do anything
  2. [ -z "$PS1" ] && return
  3. HISTCONTROL=ignoredups:ignorespace
  4. shopt -s histappend
  5. HISTSIZE=1000
  6. HISTFILESIZE=2000
  7. shopt -s checkwinsize
  8. [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
  9. if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
  10. debian_chroot=$(cat /etc/debian_chroot)
  11. fi
  12. # set a fancy prompt (non-color, unless we know we "want" color)
  13. case "$TERM" in
  14. xterm-color) color_prompt=yes;;
  15. esac
  16. force_color_prompt=yes
  17. BGREEN='\[\033[1;32m\]'
  18. GREEN='\[\033[0;32m\]'
  19. BRED='\[\033[1;31m\]'
  20. RED='\[\033[0;31m\]'
  21. BBLUE='\[\033[1;34m\]'
  22. BLUE='\[\033[0;34m\]'
  23. NORMAL='\[\033[00m\]'
  24. if [ -n "$force_color_prompt" ]; then
  25. if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
  26. # We have color support; assume it's compliant with Ecma-48
  27. # (ISO/IEC-6429). (Lack of such support is extremely rare, and such
  28. # a case would tend to support setf rather than setaf.)
  29. color_prompt=yes
  30. else
  31. color_prompt=
  32. fi
  33. fi
  34. if [ "$color_prompt" = yes ]; then
  35. #PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]-=[\u@\h]=-\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
  36. PS1="${BLUE}(${GREEN}\w${BLUE}) ${NORMAL}\h ${GREEN}\$ ${NORMAL}"
  37. else
  38. PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
  39. fi
  40. unset color_prompt force_color_prompt
  41. # If this is an xterm set the title to user@host:dir
  42. case "$TERM" in xterm*|rxvt*)
  43. PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
  44. ;; *)
  45. ;; esac
  46. # enable color support of ls and also add handy aliases
  47. if [ -x /usr/bin/dircolors ]; then
  48. test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
  49. alias ls='ls -X --color=auto'
  50. #alias dir='dir --color=auto' alias vdir='vdir --color=auto'
  51. alias grep='grep --color=auto'
  52. alias fgrep='fgrep --color=auto'
  53. alias egrep='egrep --color=auto' fi
  54. # some more ls aliases
  55. alias ll='ls -alF' alias la='ls -A' alias l='ls -CF'
  56. # Add an "alert" alias for long running commands. Use like so:
  57. # sleep 10; alert
  58. alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e
  59. '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
  60. # Alias definitions. You may want to put all your additions into a separate file like ~/.bash_aliases, instead of adding
  61. # them here directly. See /usr/share/doc/bash-doc/examples in the bash-doc package.
  62. if [ -f ~/.bash_aliases ]; then
  63. . ~/.bash_aliases fi
  64. alias ftp='yafc'
  65. # enable programmable completion features (you don't need to enable this, if it's already enabled in /etc/bash.bashrc and
  66. # /etc/profile sources /etc/bash.bashrc).
  67. if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
  68. . /etc/bash_completion fi
  69. export EDITOR=vim