home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / share / doc / adduser / examples / adduser.local.conf.examples / skel / dot.bashrc < prev   
Encoding:
Text File  |  2009-03-27  |  1.8 KB  |  63 lines

  1. #########################################################################
  2. #            .bashrc: Personal initialisation file for bash             #
  3. #########################################################################
  4.  
  5. # This file is executed by interactive shells (ie, shells for which you
  6. # are able to provide keyboard input).  It is the best place to put shell
  7. # aliases, etc.
  8. #
  9. # [JNZ] Modified 23-Sep-2004
  10. #
  11. # Written by John Zaitseff and released into the public domain.
  12.  
  13.  
  14. # Variable settings for your convenience
  15.  
  16. export LANG=en_AU.UTF-8                # We are in Australia
  17. export LC_ALL=en_AU.UTF-8
  18. export TIME_STYLE=$'+%b %e  %Y\n%b %e %H:%M'    # As used by ls(1)
  19. export EDITOR=emacs                # Everyone's favourite editor
  20. export CVSROOT=:ext:cvs.zap.org.au:/data/cvs
  21. export CVS_RSH=ssh
  22.  
  23. # Useful aliases, defined whether or not this shell is interactive
  24.  
  25. alias cls=clear
  26. alias ls="ls -v"
  27. alias dir="ls -laF"
  28. alias lock="clear; vlock -a; clear"
  29. alias e="emacs -nw"
  30.  
  31.  
  32. # Run the following only if this shell is interactive
  33.  
  34. if [ "$PS1" ]; then
  35.  
  36.     export IGNOREEOF=5            # Disallow accidental Ctrl-D
  37.  
  38.     # Set options, depending on terminal type
  39.     if [ -z "$TERM" -o "$TERM" = "dumb" ]; then
  40.         # Not a very smart terminal
  41.         export PS1="[ \u@\h | \w ] "
  42.     else
  43.         # Assume a smart VT100-based terminal with colour
  44.  
  45.     # Make sure the terminal is in UTF-8 mode.  This is a hack!
  46.     /bin/echo -n -e '\033%G'
  47.  
  48.     # Make ls(1) use colour in its listings
  49.         if [ -x /usr/bin/dircolors ]; then
  50.             alias ls="ls -v --color=auto"
  51.             eval $(/usr/bin/dircolors --sh)
  52.         fi
  53.  
  54.     # Set the terminal prompt
  55.         if [ $(id -u) -ne 0 ]; then
  56.             export PS1="\[\e[7m\][ \u@\h | \w ]\[\e[0m\] "
  57.         else
  58.             # Root user gets a nice RED prompt!
  59.             export PS1="\[\e[41;30m\][ \u@\h | \w ]\[\e[0m\] "
  60.         fi
  61.     fi
  62. fi
  63.