Advertisement
Guest User

Linux Mint 14 Default bash.bashrc

a guest
Dec 1st, 2012
3,078
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.16 KB | None | 0 0
  1. Linux Mint 14 Default bash.bashrc located in /etc/bash.bashrc
  2.  
  3. # System-wide .bashrc file for interactive bash(1) shells.
  4.  
  5. # To enable the settings / commands in this file for login shells as well,
  6. # this file has to be sourced in /etc/profile.
  7.  
  8. # If not running interactively, don't do anything
  9. [ -z "$PS1" ] && return
  10.  
  11. # check the window size after each command and, if necessary,
  12. # update the values of LINES and COLUMNS.
  13. shopt -s checkwinsize
  14.  
  15. # set variable identifying the chroot you work in (used in the prompt below)
  16. if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
  17. debian_chroot=$(cat /etc/debian_chroot)
  18. fi
  19.  
  20. use_color=false
  21.  
  22. # Set colorful PS1 only on colorful terminals.
  23. # dircolors --print-database uses its own built-in database
  24. # instead of using /etc/DIR_COLORS. Try to use the external file
  25. # first to take advantage of user additions. Use internal bash
  26. # globbing instead of external grep binary.
  27. safe_term=${TERM//[^[:alnum:]]/?} # sanitize TERM
  28. match_lhs=""
  29. [[ -f ~/.dir_colors ]] && match_lhs="${match_lhs}$(<~/.dir_colors)"
  30. [[ -f /etc/DIR_COLORS ]] && match_lhs="${match_lhs}$(</etc/DIR_COLORS)"
  31. [[ -z ${match_lhs} ]] \
  32. && type -P dircolors >/dev/null \
  33. && match_lhs=$(dircolors --print-database)
  34. [[ $'\n'${match_lhs} == *$'\n'"TERM "${safe_term}* ]] && use_color=true
  35.  
  36. if ${use_color} ; then
  37. # Enable colors for ls, etc. Prefer ~/.dir_colors #64489
  38. if type -P dircolors >/dev/null ; then
  39. if [[ -f ~/.dir_colors ]] ; then
  40. eval $(dircolors -b ~/.dir_colors)
  41. elif [[ -f /etc/DIR_COLORS ]] ; then
  42. eval $(dircolors -b /etc/DIR_COLORS)
  43. fi
  44. fi
  45.  
  46. if [[ ${EUID} == 0 ]] ; then
  47. PS1='${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\h\[\033[01;34m\] \W \$\[\033[00m\] '
  48. else
  49. PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] '
  50. fi
  51.  
  52. alias ls='ls --color=auto'
  53. alias grep='grep --colour=auto'
  54. else
  55. if [[ ${EUID} == 0 ]] ; then
  56. # show root@ when we don't have colors
  57. PS1='\u@\h \W \$ '
  58. else
  59. PS1='\u@\h \w \$ '
  60. fi
  61. fi
  62.  
  63. # Try to keep environment pollution down, EPA loves us.
  64. unset use_color safe_term match_lhs
  65.  
  66. # Commented out, don't overwrite xterm -T "title" -n "icontitle" by default.
  67. # If this is an xterm set the title to user@host:dir
  68. #case "$TERM" in
  69. #xterm*|rxvt*)
  70. # PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
  71. # ;;
  72. #*)
  73. # ;;
  74. #esac
  75.  
  76. # enable bash completion in interactive shells
  77. if [ -f /etc/bash_completion ]; then
  78. . /etc/bash_completion
  79. fi
  80.  
  81. # if the command-not-found package is installed, use it
  82. if [ -x /usr/lib/command-not-found ]; then
  83. function command_not_found_handle {
  84. # check because c-n-f could've been removed in the meantime
  85. if [ -x /usr/lib/command-not-found ]; then
  86. /usr/bin/python /usr/lib/command-not-found -- $1
  87. return $?
  88. else
  89. return 127
  90. fi
  91. }
  92. fi
  93.  
  94. /usr/bin/mint-fortune
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement