shrc: simplify per-host customization

Use ~/.shrc.local instead of ~/.shrc.$(hostname)
This commit is contained in:
Lucas 2022-11-06 13:39:34 +00:00
parent 98659829cb
commit a46787c684
1 changed files with 2 additions and 5 deletions

View File

@ -77,11 +77,8 @@ if command -v calendar >/dev/null && [ -f ~/.calendar/calendar ]; then
calendar
fi
_host=$(hostname 2>/dev/null)
_host=${_host%%.*}
if [ -n "$_host" ] && [ -f ~/.shrc."$_host" ]; then
. ~/.shrc."$_host"
if [ -s ~/.shrc.local ]; then
. ~/.shrc.local
fi
unset _host
set -o emacs