zsh:autoload: Fix loading of symlinked functions
Only plain files were autoloaded because of the glob qualifier. Switch to no-directories so that symlinks (e.g. git-ssh-and-https) are loaded.
This commit is contained in:
@@ -14,7 +14,7 @@ if [[ -d "$ZDOTDIR/autoload" ]]; then
|
|||||||
# Include all wrapper scripts if their wrapped command exists
|
# Include all wrapper scripts if their wrapped command exists
|
||||||
for d in "$ZDOTDIR/autoload/"**/wrapper(/N); do
|
for d in "$ZDOTDIR/autoload/"**/wrapper(/N); do
|
||||||
fpath=("$d" $fpath)
|
fpath=("$d" $fpath)
|
||||||
for f in "$d"/[^_.]*(.xN:t); do
|
for f in "$d"/[^_.]*(xN^/:t); do
|
||||||
(( $+commands[$f] )) || continue
|
(( $+commands[$f] )) || continue
|
||||||
autoload -Uz -- "$f"
|
autoload -Uz -- "$f"
|
||||||
done
|
done
|
||||||
@@ -26,9 +26,9 @@ if [[ -d "$ZDOTDIR/autoload" ]]; then
|
|||||||
[[ ${d:t} != wrapper ]] || continue
|
[[ ${d:t} != wrapper ]] || continue
|
||||||
|
|
||||||
fpath=("$d" $fpath)
|
fpath=("$d" $fpath)
|
||||||
autoload -Uz -- "" "$d"/[^_.]*(.xN:t)
|
autoload -Uz -- "" "$d"/[^_.]*(xN^/:t)
|
||||||
done
|
done
|
||||||
|
|
||||||
fpath=("$ZDOTDIR/autoload" $fpath)
|
fpath=("$ZDOTDIR/autoload" $fpath)
|
||||||
autoload -Uz -- "" "${fpath[1]}"/[^_.]*(.xN:t)
|
autoload -Uz -- "" "${fpath[1]}"/[^_.]*(xN^/:t)
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user