From 7d19d0fd5608ffd538eaf15a398fd2cb231da13f Mon Sep 17 00:00:00 2001 From: ds6 Date: Wed, 18 Mar 2020 21:08:13 -0500 Subject: [PATCH] add zshenv debounce, check for perl before init --- base/.zshenv | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/base/.zshenv b/base/.zshenv index 7a5982f..1809f47 100644 --- a/base/.zshenv +++ b/base/.zshenv @@ -22,7 +22,7 @@ export XDG_RUNTIME_DIR=~/tmp ### applications export PYTHONSTARTUP=~/.pythonrc ## perl -eval $(perl -I $XDG_DATA_HOME/perl5/lib/perl5 -Mlocal::lib=$XDG_DATA_HOME/perl5) +(( ${+commands[perl]} )) && eval $(perl -I $XDG_DATA_HOME/perl5/lib/perl5 -Mlocal::lib=$XDG_DATA_HOME/perl5) ### freebsd if [[ "$OSTYPE" =~ "^freebsd" ]]; then @@ -31,6 +31,7 @@ if [[ "$OSTYPE" =~ "^freebsd" ]]; then fi ### load site-specific -if [[ -f ~/.zshenv.local ]] { +if [[ -e "~/.zshenv.local" ]] && [[ ! -v _ZSHENV_LOADED ]] { + export _ZSHENV_LOADED= source ~/.zshenv.local } -- 2.48.1