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.

98 lines
2.7 KiB

11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
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
  43. xterm*|rxvt*)
  44. PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
  45. ;;
  46. *)
  47. ;;
  48. esac
  49. # enable color support of ls and also add handy aliases
  50. if [ -x /usr/bin/dircolors ]; then
  51. test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
  52. alias ls='ls -X --color=auto'
  53. #alias dir='dir --color=auto'
  54. #alias vdir='vdir --color=auto'
  55. alias grep='grep --color=auto'
  56. alias fgrep='fgrep --color=auto'
  57. alias egrep='egrep --color=auto'
  58. fi
  59. # some more ls aliases
  60. alias ll='ls -alF'
  61. alias la='ls -A'
  62. alias l='ls -CF'
  63. # Add an "alert" alias for long running commands. Use like so:
  64. # sleep 10; alert
  65. alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
  66. # Alias definitions.
  67. # You may want to put all your additions into a separate file like
  68. # ~/.bash_aliases, instead of adding them here directly.
  69. # See /usr/share/doc/bash-doc/examples in the bash-doc package.
  70. if [ -f ~/.bash_aliases ]; then
  71. . ~/.bash_aliases
  72. fi
  73. alias ftp='yafc'
  74. # enable programmable completion features (you don't need to enable
  75. # this, if it's already enabled in /etc/bash.bashrc and /etc/profile
  76. # sources /etc/bash.bashrc).
  77. if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
  78. . /etc/bash_completion
  79. fi
  80. export EDITOR=vim