From f71c3ea10805832264a176343a3d78432ca6606a Mon Sep 17 00:00:00 2001 From: Patrick Tavares Date: Sat, 7 Aug 2021 22:04:44 +0200 Subject: [PATCH] :bug: resolve load --- zsh-tfswitch.plugin.zsh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/zsh-tfswitch.plugin.zsh b/zsh-tfswitch.plugin.zsh index 13f0fcd..36ec70a 100755 --- a/zsh-tfswitch.plugin.zsh +++ b/zsh-tfswitch.plugin.zsh @@ -4,6 +4,7 @@ # commons ##################### autoload colors is-at-least +autoload -U add-zsh-hook ######################### # constant @@ -81,7 +82,8 @@ update_zsh_tfswitch() { _zsh_tfswitch_load() { # export PATH - export PATH=${PATH}:${TFSWITCH_HOME} + export CUSTOMBIN=$HOME/.local/bin + export PATH=${PATH}:${TFSWITCH_HOME}:${CUSTOMBIN} } # install tfswitch if it isnt already installed @@ -98,12 +100,12 @@ fi ######################################################## load-tfswitch() { local tfswitchrc_path=".tfswitchrc" - if [ -f "$tfswitchrc_path" ]; then tfswitch fi } -add-zsh-hook chpwd load-tfswitch -load-tfswitch unset -f _zsh_tfswitch_install _zsh_tfswitch_load + +add-zsh-hook chpwd load-tfswitch +load-tfswitch