The default .profile file defines some very useful aliases and shell flags like -o emacs. But these settings are effective for login shells only, i. e. after su(1) or starting the shell in an xterm(1), you'll have to reenter the environment. So I suggest to use the ENV feature of the shell. In the Fix section you'll find a diff for the dot.profile and a new file dot.shrc. Fix: ---------------- here comes dot.shrc --------------------------------------- # # .shrc - ENV file for /bin/sh # # This file will be used if the shell is invoked for interactive use and # the environment variable ENV is set to this file. # # see also sh(1), environ(7). # $Id$ # # Uncomment next line to enable the builtin emacs(1) command line editor # in sh(1), e.g. C-a -> beginning-of-line. # set -o emacs # some useful aliases alias h='fc -l' alias j=jobs alias m=$PAGER alias ll='ls -laFo' alias l='ls -l' alias g='egrep -i' # # be paranoid # alias cp='cp -ip' # alias mv='mv -i' # alias rm='rm -i' # # set prompt: ``username@hostname$ '' # PS1="`whoami`@`hostname | sed 's/\..*//'`" # case `id -u` in # 0) PS1="${PS1}# ";; # *) PS1="${PS1}$ ";; # esac # search path for cd(1) # CDPATH=.:$HOME--IEWNQ1k1CI0a9xx5yIOBHlwyJH3pk7xNlnnMfGm34kZXyVhp Content-Type: text/plain; name="file.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="file.diff" Index: dot.profile =================================================================== RCS file: /usr/cvsroot/src/share/skel/dot.profile,v retrieving revision 1.11 diff -c -r1.11 dot.profile *** dot.profile 1997/03/08 16:35:39 1.11 --- dot.profile 1997/06/01 18:24:31 *************** *** 22,56 **** # # umask 022 ! # Uncomment next line to enable the builtin emacs(1) command line editor ! # in sh(1), e.g. C-a -> beginning-of-line. ! # set -o emacs ! ! ! # some useful aliases ! alias h='fc -l' ! alias j=jobs ! alias m=$PAGER ! alias ll='ls -lagFo' ! alias l='ls -l' ! alias g='egrep -i' ! ! # # be paranoid ! # alias cp='cp -ip' ! # alias mv='mv -i' ! # alias rm='rm -i' ! ! ! # # 8-bit locale (English, USA), to read umlauts in vi(1). # LANG=en_US.ISO_8859-1; export LANG ! ! # # set prompt: ``username@hostname$ '' ! # PS1="`whoami`@`hostname | sed 's/\..*//'`" ! # case `id -u` in ! # 0) PS1="${PS1}# ";; ! # *) PS1="${PS1}$ ";; ! # esac ! ! # search path for cd(1) ! # CDPATH=.:$HOME --- 22,29 ---- # # umask 022 ! # 8-bit locale (English, USA), to read umlauts in vi(1). # LANG=en_US.ISO_8859-1; export LANG ! # set ENV to a file invoked each time sh is started for interactive use. ! ENV=$HOME/.shrc; export ENV
I think this enhances the usability of sh(1)--at least for me. But since no one else seems to even consider it, it should be closed. Wolfgang
State Changed From-To: open->closed Closed by originator request.