bash.bashrc 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. # System-wide .bashrc file for interactive bash(1) shells.
  2. # To enable the settings / commands in this file for login shells as well,
  3. # this file has to be sourced in /etc/profile.
  4. # If not running interactively, don't do anything
  5. [ -z "$PS1" ] && return
  6. # check the window size after each command and, if necessary,
  7. # update the values of LINES and COLUMNS.
  8. shopt -s checkwinsize
  9. # set variable identifying the chroot you work in (used in the prompt below)
  10. if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
  11. debian_chroot=$(cat /etc/debian_chroot)
  12. fi
  13. # set a fancy prompt (non-color, overwrite the one in /etc/profile)
  14. PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
  15. # Commented out, don't overwrite xterm -T "title" -n "icontitle" by default.
  16. # If this is an xterm set the title to user@host:dir
  17. #case "$TERM" in
  18. #xterm*|rxvt*)
  19. # PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
  20. # ;;
  21. #*)
  22. # ;;
  23. #esac
  24. # enable bash completion in interactive shells
  25. #if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
  26. # . /etc/bash_completion
  27. #fi
  28. # if the command-not-found package is installed, use it
  29. if [ -x /usr/lib/command-not-found -o -x /usr/share/command-not-found/command-not-found ]; then
  30. function command_not_found_handle {
  31. # check because c-n-f could've been removed in the meantime
  32. if [ -x /usr/lib/command-not-found ]; then
  33. /usr/bin/python /usr/lib/command-not-found -- "$1"
  34. return $?
  35. elif [ -x /usr/share/command-not-found/command-not-found ]; then
  36. /usr/bin/python /usr/share/command-not-found/command-not-found -- "$1"
  37. return $?
  38. else
  39. printf "%s: command not found\n" "$1" >&2
  40. return 127
  41. fi
  42. }
  43. fi
  44. export LANG=en_US.UTF-8
  45. export HISTCONTROL=ignoreboth
  46. shopt -s histappend
  47. shopt -s checkwinsize
  48. alias ping='ping -n'
  49. alias gem='TAR_OPTIONS=--no-same-owner gem'
  50. PS1='\[\e[1;37m\]d\[\e[0m\][\t] [${debian_chroot:+($debian_chroot)}\u@\h \w]\$ '
  51. . /usr/local/share/chruby/chruby.sh
  52. # Selecting the latest ruby in opt
  53. chruby $(chruby | head -1 | tr -d '*') 2>/dev/null
  54. #export LD_LIBRARY_PATH='/mnt/chroots/texlive/srv/current/jessie/lib:.'
  55. export PATH="/mnt/chroots/texlive/srv/current/jessie/bin:$PATH"
  56. export PERL5LIB=/mnt/chroots/texlive/usr/share/texlive/texmf-dist/scripts/texlive