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 | |
| parent | f4857f1db71aed11a2ec4fabb21a31e72bb973c7 (diff) | |
zsh: Use :l when defining DOMAIN, HOST, and UNAME
Diffstat (limited to 'zsh')
| -rw-r--r-- | zsh/env | 11 | ||||
| -rw-r--r-- | zsh/login | 6 | ||||
| -rw-r--r-- | zsh/rc | 6 |
3 files changed, 12 insertions, 11 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 @@ -1,5 +1,5 @@ # -*- mode: shell-script -*- -source_if_exists dotfiles-${UNAME:l}/zsh/login -source_if_exists dotfiles-${DOMAIN:l}/zsh/login -source_if_exists dotfiles-${HOST:l}/zsh/login +source_if_exists dotfiles-${UNAME}/zsh/login +source_if_exists dotfiles-${DOMAIN}/zsh/login +source_if_exists dotfiles-${HOST}/zsh/login @@ -55,8 +55,8 @@ setopt HIST_REDUCE_BLANKS setopt INC_APPEND_HISTORY setopt SHARE_HISTORY -source_if_exists dotfiles-${UNAME:l}/zsh/rc -source_if_exists dotfiles-${DOMAIN:l}/zsh/rc -source_if_exists dotfiles-${HOST:l}/zsh/rc +source_if_exists dotfiles-${UNAME}/zsh/rc +source_if_exists dotfiles-${DOMAIN}/zsh/rc +source_if_exists dotfiles-${HOST}/zsh/rc compinit -d ${XDG_CACHE_HOME}/zsh/compdump |
