# Ian Jackson's shell rc hostname_completion_file=~/.hosts export PWD # My own functions ls() { /bin/ls -FC "$@" ; } ll() { /bin/ls -FClag "$@" ; } setprompt() { PS1=`autotitle`; export PS1; } rs() { eval `/usr/openwin/bin/resize` ; setprompt ; } cd() { builtin cd "$@"; setprompt; } pu() { builtin pushd "$@"; setprompt; } po() { builtin popd "$@"; setprompt; } # newgrp() { # NEWGRPSHELL="${LOGINSHELL:-}"; export NEWGRPSHELL # exec /bin/newgrp $* # } setenv () { varname=`echo $1 | tr '[a-z]' '[A-Z]'` eval "$varname=\"$2\"" ; export $varname ; } # if [ "${NEWGRPSHELL:-}" ] # then # unset NEWGRPSHELL # LOGINSHELL=true # fi # Set up history and prompt if [ "$PS1" ] then HISTFILE=$HOME/.history/$HOST~$$~ AUTOTITLE_STDOUT="${LOGINSHELL:+-}%?u%U%!%?g(%G)%!%?u@%!%h:%d1~.> " AUTOTITLE_WINDOW="%h - %d~. %Y.[U..[M..[D./..%X.L]..M]..R]./.. %U%?G(%G)%!" AUTOTITLE_ICON="%h: %d3~. %Y.[U..[M..[D./..%X.L]..M]..R]./.." export AUTOTITLE_STDOUT AUTOTITLE_WINDOW AUTOTITLE_ICON setprompt fi # Set up the terminal: # stty new intr '^c' erase '^?' kill '^x' susp '^z' dsusp '^y' eof '^d' \ # hupcl ixon ixoff -tostop quit '^\' 2>/dev/null