diff options
| author | Grégoire Duchêne <gduchene@awhk.org> | 2023-07-08 12:08:25 +0100 |
|---|---|---|
| committer | Grégoire Duchêne <gduchene@awhk.org> | 2023-07-08 12:08:25 +0100 |
| commit | 6d720a1be90d19f6a785bec09354fbcd2a1a47ad (patch) | |
| tree | 32783898c91a8818c1ce965a988ecaef141271dd /zsh/env | |
| parent | ba07f6a54ffc59cf315282ebf4c9358f4a4e525c (diff) | |
zsh: Simplify how DOMAIN is defined
Diffstat (limited to 'zsh/env')
| -rw-r--r-- | zsh/env | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -8,9 +8,9 @@ source_if_exists() { [[ -f $(dotfiles_root)/$1 ]] && . $(dotfiles_root)/$1 || return 0 } -[[ ${HOST} =~ \\. ]] && export DOMAIN=${(j:.:)${(s:.:)HOST}[-2,-1]:l} export HOST=${HOST:l} export HOST_SHORT=${${(%):-%m}:l} +export DOMAIN=${${${(%):-%M}#${HOST_SHORT}.}:l} case ${OSTYPE} in darwin*) export UNAME=darwin ;; linux*) export UNAME=linux ;; |
