diff --git a/dot_hooks.tmpl b/dot_hooks.tmpl index a025c71..71a5e17 100644 --- a/dot_hooks.tmpl +++ b/dot_hooks.tmpl @@ -1,6 +1,7 @@ +# shellcheck shell=sh # >>> conda initialize >>> # !! Contents within this block are managed by 'conda init' !! -__conda_setup="$($HOME/miniconda3/bin/conda shell.$(basename $(readlink -f /proc/$$/exe)) 'hook' 2> /dev/null)" +__conda_setup="$($HOME/miniconda3/bin/conda shell.$SH 'hook' 2> /dev/null)" if [ $? -eq 0 ]; then eval "$__conda_setup" else @@ -18,7 +19,7 @@ fi # <<< conda initialize <<< {{- if lookPath "direnv" }} -eval "$(direnv hook $(basename $(readlink -f /proc/$$/exe)))" +eval "$(direnv hook $SH)" {{- end }} if [ -f $HOME/.ion/bin/ion ]; then @@ -27,8 +28,8 @@ if [ -f $HOME/.ion/bin/ion ]; then fi # Import GNU parallel -if [ $(command -v env_parallel.$(basename $(readlink -f /proc/$$/exe))) ]; then - source $(which env_parallel.$(basename $(readlink -f /proc/$$/exe))) +if [ $(command -v env_parallel.$SH) ]; then + source $(which env_parallel.$SH) fi {{- if eq .machinetype "workstation" }} diff --git a/executable_dot_bashrc.tmpl b/executable_dot_bashrc.tmpl index 34b39c0..ceb87b1 100644 --- a/executable_dot_bashrc.tmpl +++ b/executable_dot_bashrc.tmpl @@ -1,5 +1,6 @@ # shellcheck shell=bash # .bashrc +export SH=bash if [ -f "$HOME/.modules" ]; then source $HOME/.modules diff --git a/executable_dot_zshrc.tmpl b/executable_dot_zshrc.tmpl index 4529d6f..3f80f0e 100644 --- a/executable_dot_zshrc.tmpl +++ b/executable_dot_zshrc.tmpl @@ -1,3 +1,4 @@ +export SH=zsh {{- if eq .chezmoi.os "linux" }} {{- if or (eq .machinetype "workstation")