diff options
| author | Grégoire Duchêne <gduchene@awhk.org> | 2020-05-24 23:29:15 +0100 |
|---|---|---|
| committer | Grégoire Duchêne <gduchene@awhk.org> | 2020-05-24 23:58:46 +0100 |
| commit | cabd13b69566002210c0b2988af849520c4a6d21 (patch) | |
| tree | e580de57392dab4f74d3b5a84765d8f6db032acd /zsh/env | |
| parent | f4857f1db71aed11a2ec4fabb21a31e72bb973c7 (diff) | |
zsh: Use :l when defining DOMAIN, HOST, and UNAME
Diffstat (limited to 'zsh/env')
| -rw-r--r-- | zsh/env | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -4,12 +4,13 @@ source_if_exists() { [[ -f ${${(%):-%x}:A:h:h}/$1 ]] && . ${${(%):-%x}:A:h:h}/$1 || return 0 } -export DOMAIN=$(cut -d. -f2- -s <<<${HOST}) -export UNAME=$(uname) +export DOMAIN=${$(cut -d. -f2- -s <<<${HOST}):l} +export HOST=${HOST:l} +export UNAME=${$(uname):l} setopt EXTENDED_GLOB setopt REMATCH_PCRE -source_if_exists dotfiles-${UNAME:l}/zsh/env -source_if_exists dotfiles-${DOMAIN:l}/zsh/env -source_if_exists dotfiles-${HOST:l}/zsh/env +source_if_exists dotfiles-${UNAME}/zsh/env +source_if_exists dotfiles-${DOMAIN}/zsh/env +source_if_exists dotfiles-${HOST}/zsh/env |
