From 4970349c55d6a498368af3b654e66293bb56c238 Mon Sep 17 00:00:00 2001 From: Robert Morrison Date: Sun, 20 Feb 2022 01:40:09 +0000 Subject: [PATCH] bugfix - load functions Load functions by manipulating fpath --- functions/exit | 24 ------------------------ zshrc | 8 ++++++-- 2 files changed, 6 insertions(+), 26 deletions(-) delete mode 100755 functions/exit diff --git a/functions/exit b/functions/exit deleted file mode 100755 index 6763a6a..0000000 --- a/functions/exit +++ /dev/null @@ -1,24 +0,0 @@ -############################## -# tmp directory cleanup code # -# now functionified # -# empties ~/tmp # -# unless KEEPTMP exists # -############################## - - -function CleanTmp() { -## exit if no tmp folder -[ ! -d "$HOME/tmp" ] && return -## exit if KEEPTMP -[ -f "$HOME/tmp/KEEPTMP" ] && return - -## remove tmp -## Pipe all output to file -rm -rvf $HOME/tmp/* > ~/.cleanupResult 2>&1 - -## remove result if cleanup successful -status=$? -[ $status -eq 0 ] && rm ~/.cleanupResult - -echo "cleaned tmp" -} #CleanTmp diff --git a/zshrc b/zshrc index a9e5acc..4f66d7d 100755 --- a/zshrc +++ b/zshrc @@ -17,6 +17,12 @@ autoload -U edit-command-line ## zmodload Modules zmodload zsh/complist +## Loca my function +fpath=( $ZDOTDIR/functions $fpath ) +autoload CleanTmp +autoload setTermTitle +autoload tempPersist + ## Source Other files source $HOME/.profile source ${ZDOTDIR}/aliases @@ -24,8 +30,6 @@ source ${ZDOTDIR}/dir_aliases source ${ZDOTDIR}/prompt source ${ZDOTDIR}/keyboard -## Source Functions -source ${ZDOTDIR}/functions/* ## Set option setopt emacs ## Emacs style keybinds