(Ab?)use some sh(1) features:

* Put the aliases in a separate file, referenced by $ENV, so that they're
  present in subshells.
* Do the same to make `set -o emacs' happen automatically in interactive
  shells.  (Yay, line editing by default!)
* Use `export FOO=bar' syntax, as it's shorter and other sh(1)-like shells
  all support it these days.
This commit is contained in:
mycroft 1999-11-05 11:30:13 +00:00
parent 80cfefa569
commit c43c81eec7
2 changed files with 15 additions and 14 deletions

View File

@ -1,25 +1,18 @@
# $NetBSD: dot.profile,v 1.10 1999/04/04 09:58:57 mycroft Exp $
# $NetBSD: dot.profile,v 1.11 1999/11/05 11:30:13 mycroft Exp $
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/pkg/sbin:/usr/pkg/bin
PATH=${PATH}:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin
export PATH
export PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/pkg/sbin:/usr/pkg/bin
export PATH=${PATH}:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin
BLOCKSIZE=1k
export BLOCKSIZE
HOME=/root
export HOME
export BLOCKSIZE=1k
export HOME=/root
if [ -x /usr/bin/tset ]; then
eval `/usr/bin/tset -sQ \?$TERM`
fi
umask 022
#ulimit -c 0
hup(){ kill -HUP `cat /var/run/$1.pid` ; }
ll(){ ls -l $* ; }
x(){ exit ; }
PS1="`hostname -s`$PS1"
export ENV=$HOME/.shrc
echo "Don't login as root, use the su command."

8
etc/root/dot.shrc Normal file
View File

@ -0,0 +1,8 @@
hup(){ kill -HUP `cat /var/run/$1.pid`; }
ll(){ ls -l ${1+"$@"}; }
case "$-" in *i*)
PS1="`hostname -s`$PS1"
set -o emacs
;;
esac