bugfix - load functions
Load functions by manipulating fpath
This commit is contained in:
parent
70822b11da
commit
4970349c55
|
|
@ -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
8
zshrc
|
|
@ -17,6 +17,12 @@ autoload -U edit-command-line
|
||||||
## zmodload Modules
|
## zmodload Modules
|
||||||
zmodload zsh/complist
|
zmodload zsh/complist
|
||||||
|
|
||||||
|
## Loca my function
|
||||||
|
fpath=( $ZDOTDIR/functions $fpath )
|
||||||
|
autoload CleanTmp
|
||||||
|
autoload setTermTitle
|
||||||
|
autoload tempPersist
|
||||||
|
|
||||||
## Source Other files
|
## Source Other files
|
||||||
source $HOME/.profile
|
source $HOME/.profile
|
||||||
source ${ZDOTDIR}/aliases
|
source ${ZDOTDIR}/aliases
|
||||||
|
|
@ -24,8 +30,6 @@ source ${ZDOTDIR}/dir_aliases
|
||||||
source ${ZDOTDIR}/prompt
|
source ${ZDOTDIR}/prompt
|
||||||
source ${ZDOTDIR}/keyboard
|
source ${ZDOTDIR}/keyboard
|
||||||
|
|
||||||
## Source Functions
|
|
||||||
source ${ZDOTDIR}/functions/*
|
|
||||||
|
|
||||||
## Set option
|
## Set option
|
||||||
setopt emacs ## Emacs style keybinds
|
setopt emacs ## Emacs style keybinds
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user