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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

105 lines
3.3 KiB

  1. # ~/.bashrc: executed by bash(1) for non-login shells.
  2. # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
  3. # for examples
  4. # If not running interactively, don't do anything
  5. case $- in
  6. *i*) ;;
  7. *) return;;
  8. esac
  9. # allow windows to show graphical applications.
  10. export DISPLAY=:0
  11. # don't put duplicate lines or lines starting with space in the history.
  12. # See bash(1) for more options
  13. HISTCONTROL=ignoreboth
  14. # append to the history file, don't overwrite it
  15. shopt -s histappend
  16. # for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
  17. HISTSIZE=1000
  18. HISTFILESIZE=2000
  19. # check the window size after each command and, if necessary,
  20. # update the values of LINES and COLUMNS.
  21. shopt -s checkwinsize
  22. shopt -s expand_aliases
  23. # If set, the pattern "**" used in a pathname expansion context will
  24. # match all files and zero or more directories and subdirectories.
  25. #shopt -s globstar
  26. # make less more friendly for non-text input files, see lesspipe(1)
  27. #[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
  28. # set variable identifying the chroot you work in (used in the prompt below)
  29. if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
  30. debian_chroot=$(cat /etc/debian_chroot)
  31. fi
  32. # set a fancy prompt (non-color, unless we know we "want" color)
  33. case "$TERM" in
  34. xterm-color|*-256color) color_prompt=yes;;
  35. esac
  36. # uncomment for a colored prompt, if the terminal has the capability; turned
  37. # off by default to not distract the user: the focus in a terminal window
  38. # should be on the output of commands, not on the prompt
  39. #force_color_prompt=yes
  40. if [ -n "$force_color_prompt" ]; then
  41. if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
  42. # We have color support; assume it's compliant with Ecma-48
  43. # (ISO/IEC-6429). (Lack of such support is extremely rare, and such
  44. # a case would tend to support setf rather than setaf.)
  45. color_prompt=yes
  46. else
  47. color_prompt=
  48. fi
  49. fi
  50. if [ "$color_prompt" = yes ]; then
  51. PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
  52. else
  53. PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
  54. fi
  55. unset color_prompt force_color_prompt
  56. # If this is an xterm set the title to user@host:dir
  57. case "$TERM" in
  58. xterm*|rxvt*)
  59. PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
  60. ;;
  61. *)
  62. ;;
  63. esac
  64. # enable color support of ls and also add handy aliases
  65. if [ -x /usr/bin/dircolors ]; then
  66. test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
  67. fi
  68. # colored GCC warnings and errors
  69. #export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
  70. # some more ls aliases
  71. # Alias definitions.
  72. # You may want to put all your additions into a separate file like
  73. # ~/.bash_aliases, instead of adding them here directly.
  74. # See /usr/share/doc/bash-doc/examples in the bash-doc package.
  75. if [ -f ~/.bash_aliases ]; then
  76. . ~/.bash_aliases
  77. fi
  78. # enable programmable completion features (you don't need to enable
  79. # this, if it's already enabled in /etc/bash.bashrc and /etc/profile
  80. # sources /etc/bash.bashrc).
  81. if ! shopt -oq posix; then
  82. if [ -f /usr/share/bash-completion/bash_completion ]; then
  83. . /usr/share/bash-completion/bash_completion
  84. elif [ -f /etc/bash_completion ]; then
  85. . /etc/bash_completion
  86. fi
  87. fi