mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-21 18:27:22 +00:00
Make sh(1) recognize the default $HOME. By default /home
is a symlink; without this change, when you log in, sh(1) won't realize the current directory (eg '/usr/home/test') is the same as $HOME ('/home/test'). Reviewed by: jilles MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D18775
This commit is contained in:
parent
a96301b673
commit
4cea05a273
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=342881
|
@ -21,6 +21,9 @@ PAGER=less; export PAGER
|
|||
# set ENV to a file invoked each time sh is started for interactive use.
|
||||
ENV=$HOME/.shrc; export ENV
|
||||
|
||||
# Let sh(1) know it's at home, despite /home being a symlink.
|
||||
if [ "$PWD" != "$HOME" ] && [ "$PWD" -ef "$HOME" ] ; then cd ; fi
|
||||
|
||||
# Query terminal size; useful for serial lines.
|
||||
if [ -x /usr/bin/resizewin ] ; then /usr/bin/resizewin -z ; fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue