Remove zshlib as submodule
This commit is contained in:
committed by
T. R. Bernstein
parent
cf459b84bd
commit
4fa98ea9a5
@@ -2,14 +2,13 @@
|
||||
# vi: set ft=zsh tw=80 ts=2
|
||||
|
||||
function autoloadZShLib() {
|
||||
test -d "${ASTZWEIG_ZSHLIB}" || { echo "This module needs astzweig/zshlib to work." >&2; return 99 }
|
||||
FPATH="${ASTZWEIG_ZSHLIB}:${FPATH}"
|
||||
[[ -d ${ASTZWEIG_ZSHLIB} || -f ${ASTZWEIG_ZSHLIB} ]] || { echo "This module needs astzweig/zshlib to work." >&2; return 99 }
|
||||
fpath+=(${ASTZWEIG_ZSHLIB})
|
||||
if [[ -d ${ASTZWEIG_ZSHLIB} ]]; then
|
||||
local funcNames=($(find "${ASTZWEIG_ZSHLIB}" -type f -perm +u=x -maxdepth 1 | awk -F/ '{ print $NF }'))
|
||||
autoload -Uz ${funcNames}
|
||||
elif [[ -f ${ASTZWEIG_ZSHLIB} ]]; then
|
||||
autoload -Uzw ${ASTZWEIG_ZSHLIB}
|
||||
autoload -Uzw ${ASTZWEIG_ZSHLIB:t}
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user