Posted By


trusktr on 10/31/10

Tagged


Statistics


Viewed 637 times
Favorited by 0 user(s)

My custom bashrc


/ Published in: Bash
Save to your folder(s)



Copy this code and paste it in your HTML
  1. #
  2. # /etc/bash.bashrc
  3. #
  4. # This file is the systemwide bashrc file. While most of the
  5. # environment is preserved when running an interactive shell
  6. # the PS[1-4] variables, aliases and functions are reset.
  7. #
  8. # When running a non-login shell, apply the following settings:
  9. # - Prompt defaults (PS[1-4], PROMPT_COMMAND)
  10. # - bash_completion if it exists
  11. # - source /etc/bash.bashrc.local
  12.  
  13. # Shell Style
  14. #PS1='[\u@\h \W]\$ ' # Old, colorless prompt.
  15. #PS1='\[\e[1;34m\][\u@\h \W]\$\[\e[0m\] ' # New, colorful, blue prompt.
  16. #PS1='\[\e[1;32m\][\u@\h \W]\$\[\e[0m\] ' # New, colorful, green prompt.
  17. PS1='\[\e[1;34m\][\[\e[1;31m\]\u\[\e[1;34m\]@\[\e[1;31m\]\h \[\e[1;34m\]\w \[\e[1;32m\]#\# \[\e[1;34m\]:\[\e[1;32m\] \t\[\e[1;34m\]]\$\[\e[0m\] '
  18. PS2='> '
  19. PS3='> '
  20. PS4='+ '
  21.  
  22. export PS1 PS2 PS3 PS4
  23.  
  24. if test "$TERM" = "xterm" -o \
  25. "$TERM" = "xterm-color" -o \
  26. "$TERM" = "xterm-256color" -o \
  27. "$TERM" = "rxvt" -o \
  28. "$TERM" = "rxvt-unicode" -o \
  29. "$TERM" = "xterm-xfree86"; then
  30. PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"'
  31. export PROMPT_COMMAND
  32. fi
  33.  
  34. [ -r /etc/bash_completion ] && . /etc/bash_completion
  35. [ -r /etc/bash.bashrc.local ] && . /etc/bash.bashrc.local
  36.  
  37. # Aliases
  38. alias ls='ls --color=auto'
  39. alias aur='yaourt'
  40.  
  41. # Default Editor
  42. export EDITOR="vim"
  43.  
  44. # Auto tab-completion for sudo commands
  45. complete -cf sudo

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.