Imported from ../bash-2.0.tar.gz.
[platform/upstream/bash.git] / examples / startup-files / Bashrc
index 935bff8..efe7d88 100644 (file)
@@ -16,57 +16,55 @@ X11=/usr/bin/X11
 
 UTIL_PATH=$GNU:$X11
 STANDARD_PATH=/usr/local/bin:/usr/ucb:/bin:/usr/bin:/usr/etc:/etc:/usr/games
-if [ "$HOSTTYPE" = "sony" ]; then STANDARD_PATH=STANDARD_PATH:/usr/sony/bin; fi
 
 if [ -d $HOME/bin/$HOSTTYPE ]; then
-  MY_PATH=$HOME/bin/$HOSTTYPE
+       MY_PATH=$HOME/bin/$HOSTTYPE
 fi
 
 if [ -d $HOME/bin ]; then
-  MY_PATH=$MY_PATH:$HOME/bin
+       MY_PATH=$MY_PATH:$HOME/bin
 fi
 
 if [ -d /usr/hosts ]; then
-  STANDARD_PATH=$STANDARD_PATH:/usr/hosts
+       STANDARD_PATH=$STANDARD_PATH:/usr/hosts
 fi
 
 PATH=.:$MY_PATH:$UTIL_PATH:$STANDARD_PATH
 
-# If running interactively, then:
-if [ "$PS1" ]; then
+# If not running interactively, then return
+if [ -z "$PS1" ]; then
+       return
+fi
 
-  # Set ignoreeof if you don't want EOF as the sole input to the shell to
-  # immediately signal a quit condition.  This only happens at the start
-  # of a line if the line is empty, and you haven't just deleted a character
-  # with C-d.  I turn this on in ~/.bash_profile so that only login shells
-  # have the right to be obnoxious.
-  # ignoreeof=
+# Set ignoreeof if you don't want EOF as the sole input to the shell to
+# immediately signal a quit condition.  This only happens at the start
+# of a line if the line is empty, and you haven't just deleted a character
+# with C-d.  I turn this on in ~/.bash_profile so that only login shells
+# have the right to be obnoxious.
+# set -o ignoreeof
 
-  # Set auto_resume if you want to resume on "emacs", as well as on
-  # "%emacs".
-  auto_resume=
+# Set auto_resume if you want to resume on "emacs", as well as on
+# "%emacs".
+auto_resume=exact
 
-  # Set notify if you want to be asynchronously notified about background
-  # job completion.
-  notify=
+# Set notify if you want to be asynchronously notified about background
+# job completion.
+set -o notify
 
-  # Make it so that failed `exec' commands don't flush this shell.
-  no_exit_on_failed_exec=
+# Make it so that failed `exec' commands don't flush this shell.
+shopt -s execfail
 
-  if [ ! "$LOGIN_SHELL" ]; then
-    PS1="\u@\h\$ "
-  fi
+if [ -z "$LOGIN_SHELL" ]; then
+       PS1="\u@\h\$ "
+fi
 
-  HISTSIZE=256
-  MAILCHECK=60
+HISTSIZE=256
+MAILCHECK=60
 
-  # A couple of default aliases.
-  alias j='jobs -l'
-  alias po=popd
-  alias pu=pushd
-  alias ls='ls -F'
+# A couple of default aliases.
+alias j='jobs -l'
+alias po=popd
+alias pu=pushd
+alias ls='ls -F'
 
-  if [ -f ~/.bash_aliases ]; then
-    source ~/.bash_aliases
-  fi
-fi
+[ -f ~/.bash_aliases ] && . ~/.bash_aliases