Add autoload-zshlib binary

This commit is contained in:
T. R. Bernstein
2024-07-02 23:49:24 +02:00
committed by T. R. Bernstein
parent d05cd0d635
commit 1a3b0d9315
4 changed files with 18 additions and 3 deletions

15
bin/autoload-zshlib Executable file
View File

@@ -0,0 +1,15 @@
#!/usr/bin/env zsh
# vi: set ft=zsh tw=80 ts=2
function autoloadZshlib() {
for fp in $fpath; do
if [[ ${fp:t} == 'zshlib.zwc' ]]; then
autoload -w $fp
break
fi
done
}
if [[ "${ZSH_EVAL_CONTEXT}" == *file ]]; then
autoloadZshlib "$@"
fi