From 6ac19899f4b4fea1a66d1894d881c1bfecda6839 Mon Sep 17 00:00:00 2001 From: Von Random <von@mechanus.net> Date: Wed, 19 Feb 2025 01:18:33 +0200 Subject: [PATCH] shell: bring direnv back, because mise cannot into command substitution --- dot_config/fish/config.fish | 4 ++++ dot_config/zsh/functions.zsh | 6 ------ dot_config/zsh/settings.zsh | 8 ++++++++ dot_zshrc | 2 ++ 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/dot_config/fish/config.fish b/dot_config/fish/config.fish index 1c40279..e968416 100644 --- a/dot_config/fish/config.fish +++ b/dot_config/fish/config.fish @@ -20,6 +20,10 @@ if status is-interactive end end + if command -q direnv + direnv hook fish | source + end + if command -q mise mise activate fish | source end diff --git a/dot_config/zsh/functions.zsh b/dot_config/zsh/functions.zsh index ce842c1..1f10498 100644 --- a/dot_config/zsh/functions.zsh +++ b/dot_config/zsh/functions.zsh @@ -1,8 +1,6 @@ # Fuck default aliases unalias -a -function testbin { whence $@ > /dev/null } - function termcompat { typeset term=$TERM case $term in @@ -99,7 +97,3 @@ if testbin grc; then done unset cmds cmd fi - -if testbin mise; then - eval "$(mise activate zsh)" -fi diff --git a/dot_config/zsh/settings.zsh b/dot_config/zsh/settings.zsh index c12fddb..d32fcd1 100644 --- a/dot_config/zsh/settings.zsh +++ b/dot_config/zsh/settings.zsh @@ -43,3 +43,11 @@ zstyle ':completion:*:processes-names' command 'ps axho command' zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} unalias ld ls ll &>/dev/null + +if testbin direnv; then + eval "$(direnv hook zsh)" +fi + +if testbin mise; then + eval "$(mise activate zsh)" +fi diff --git a/dot_zshrc b/dot_zshrc index 4834292..42917d6 100644 --- a/dot_zshrc +++ b/dot_zshrc @@ -1,5 +1,7 @@ [[ $- != *i* ]] && return +function testbin { whence $@ > /dev/null } + confdir=$HOME/.config/zsh conflist=( env.zsh