bugfix - load functions

Load functions by manipulating fpath
This commit is contained in:
Robert Morrison 2022-02-20 01:40:09 +00:00
parent 70822b11da
commit 4970349c55
Signed by: robert
GPG Key ID: 73E012EB3F4EC696
2 changed files with 6 additions and 26 deletions

View File

@ -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

8
zshrc
View File

@ -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