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.

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