new repository without sensitive information
This commit is contained in:
commit
57fa0afede
51 changed files with 1883 additions and 0 deletions
32
modules/autoloader/init
Normal file
32
modules/autoloader/init
Normal file
|
@ -0,0 +1,32 @@
|
|||
#!/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
|
||||
# (default: /etc/zsh, if you want to use this in a user configuration file, set
|
||||
# the variable $zcpath to your zsh configuration directory)
|
||||
#
|
||||
# functions are stored in the "functions" folder analogous.
|
||||
#
|
||||
|
||||
ZWIDGETPATH=${ZWIDGETPATH:-"${zcpath:-/etc/zsh}/widgets"}
|
||||
ZFUNCTIONPATH=${ZFUNCTIONPATH:-"${zcpath:-/etc/zsh}/functions"}
|
||||
fpath+=( "${ZWIDGETPATH}" )
|
||||
fpath+=( "${ZFUNCTIONPATH}" )
|
||||
|
||||
if [ -d $ZWIDGETPATH ]; then
|
||||
for i in $ZWIDGETPATH/*(N:t); do
|
||||
autoload -Uz $i
|
||||
zle -N $i
|
||||
done
|
||||
fi
|
||||
|
||||
if [ -d $ZFUNCTIONPATH ]; then
|
||||
for i in $ZFUNCTIONPATH/*(N:t); do
|
||||
autoload -Uz $i && $i
|
||||
done
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue