From 4b32447683beeea38444b198a384a6adf99721cf Mon Sep 17 00:00:00 2001 From: GrĂ©goire DuchĂȘne Date: Mon, 6 Jan 2020 21:50:13 +0000 Subject: Export DOMAIN on both Linux and macOS Also, use -s with cut so that DOMAIN will be empty if no domain is set. --- zsh/env | 1 + 1 file changed, 1 insertion(+) (limited to 'zsh') diff --git a/zsh/env b/zsh/env index 852686f..6216765 100644 --- a/zsh/env +++ b/zsh/env @@ -5,6 +5,7 @@ source_if_exists() { [[ -f ${f:A:h:h}/$1 ]] && . ${f:A:h:h}/$1 || return 0 } +export DOMAIN=$(cut -d. -f2- -s <<<${HOST}) export UNAME=$(uname) export LC_ALL=en_US.UTF-8 -- cgit v1.2.3-70-g09d2