Cleanup: remove "functions" dir
This commit is contained in:
parent
bbd9165820
commit
f70f465a37
7 changed files with 0 additions and 104 deletions
|
@ -1,44 +0,0 @@
|
|||
#!/bin/zsh
|
||||
|
||||
#################################################################################
|
||||
# ZSH zle widget and custom function autloader
|
||||
#################################################################################
|
||||
#
|
||||
# Lets you load custom functions and zle widgets split into single files.
|
||||
#
|
||||
# zle widgets are stored in the "widgets" folder in your configuration directory
|
||||
# (set with $ZDOTDIR, see manpage). The widgets in /etc/zsh/widgets are also
|
||||
# considered.
|
||||
#
|
||||
# functions are stored in the "functions" folder analogous.
|
||||
#
|
||||
|
||||
if [[ -z $ZWIDGETPATH ]]; then
|
||||
ZWIDGETPATH=( ${ZDOTDIR:+$ZDOTDIR/widgets} )
|
||||
[[ -d /etc/zsh/widgets ]] && ZWIDGETPATH+=/etc/zsh/widgets
|
||||
fi
|
||||
|
||||
if [[ -z $ZFUNCTIONPATH ]]; then
|
||||
ZFUNCTIONPATH=( ${ZDOTDIR:+$ZDOTDIR/functions} )
|
||||
[[ -d /etc/zsh/functions ]] && ZFUNCTIONPATH+=/etc/zsh/functions
|
||||
fi
|
||||
|
||||
fpath+=(${ZWIDGETPATH})
|
||||
fpath+=(${ZFUNCTIONPATH})
|
||||
|
||||
for dir in $ZWIDGETPATH; do
|
||||
if [ -d $dir ]; then
|
||||
for i in $dir/*~*.zwc(N:t); do
|
||||
autoload -Uz $i
|
||||
zle -N $i
|
||||
done
|
||||
fi
|
||||
done
|
||||
|
||||
for dir in $ZFUNCTIONPATH; do
|
||||
if [ -d $dir ]; then
|
||||
for i in $dir/*~*.zwc(N:t); do
|
||||
autoload -Uz $i
|
||||
done
|
||||
fi
|
||||
done
|
Loading…
Add table
Add a link
Reference in a new issue