From e104192fa530da5892adb7dd5570126595ccda0b Mon Sep 17 00:00:00 2001 From: Lucas Date: Sat, 1 Oct 2022 15:02:34 +0000 Subject: [PATCH] shrc: allow per-host customization --- dotfiles/shrc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dotfiles/shrc b/dotfiles/shrc index e35a69d..4e86f4a 100644 --- a/dotfiles/shrc +++ b/dotfiles/shrc @@ -77,4 +77,11 @@ 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" +fi +unset _host + set -o emacs