Advertisement
quark_zju

bashrc (from CM6)

Nov 9th, 2012
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.71 KB | None | 0 0
  1. # /etc/bash/bashrc
  2. #
  3. # This file is sourced by all *interactive* bash shells on startup,
  4. # including some apparently interactive shells such as scp and rcp
  5. # that can't tolerate any output.  So make sure this doesn't display
  6. # anything or bad things will happen !
  7.  
  8.  
  9. # Test for an interactive shell.  There is no need to set anything
  10. # past this point for scp and rcp, and it's important to refrain from
  11. # outputting anything in those cases.
  12. if [[ $- != *i* ]] ; then
  13.     # Shell is non-interactive.  Be done now!
  14.     return
  15. fi
  16.  
  17. # Bash won't get SIGWINCH if another process is in the foreground.
  18. # Enable checkwinsize so that bash will check the terminal size when
  19. # it regains control.  #65623
  20. # http://cnswww.cns.cwru.edu/~chet/bash/FAQ (E11)
  21. shopt -s checkwinsize
  22.  
  23. # Enable history appending instead of overwriting.  #139609
  24. shopt -s histappend
  25.  
  26. use_color=false
  27.  
  28. # set some environment variables
  29. HOME=/sdcard
  30. TERM=linux
  31.  
  32. # enable colorful terminal
  33. if [[ ${EUID} == 0 ]] ; then
  34.     PS1='\[\033[01;31m\]\h\[\033[01;34m\] \W \$\[\033[00m\] '
  35. else
  36.     PS1='\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] '
  37. fi
  38.  
  39. # Set up a ton of aliases to cover toolbox with the nice busybox
  40. # equivalents of its commands
  41. alias cat='busybox cat'
  42. alias ln='busybox ln'
  43. alias ls='busybox ls --color'
  44. alias mount='busybox mount'
  45. alias rm='busybox rm'
  46. alias umount='busybox umount'
  47. alias df='busybox df'
  48. alias chmod='busybox chmod'
  49. alias chown='busybox chown'
  50. alias mv='busybox mv'
  51. alias mkdir='busybox mkdir'
  52. alias rmdir='busybox rmdir'
  53. alias insmod='busybox insmod'
  54. alias rmmod='busybox rmmod'
  55. alias lsmod='busybox lsmod'
  56.  
  57. # Try to keep environment pollution down, EPA loves us.
  58. unset use_color safe_term match_lhs
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement