From 9ed2f526da52d7c492a5c08870779f1ecc22bd7f Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Thu, 19 Jun 2025 12:49:01 +0200 Subject: [PATCH] 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. --- .config/zsh/zshrc.d/00-autoload.zsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.config/zsh/zshrc.d/00-autoload.zsh b/.config/zsh/zshrc.d/00-autoload.zsh index d99fb7b..fe18021 100644 --- a/.config/zsh/zshrc.d/00-autoload.zsh +++ b/.config/zsh/zshrc.d/00-autoload.zsh @@ -14,7 +14,7 @@ if [[ -d "$ZDOTDIR/autoload" ]]; then # Include all wrapper scripts if their wrapped command exists for d in "$ZDOTDIR/autoload/"**/wrapper(/N); do fpath=("$d" $fpath) - for f in "$d"/[^_.]*(.xN:t); do + for f in "$d"/[^_.]*(xN^/:t); do (( $+commands[$f] )) || continue autoload -Uz -- "$f" done @@ -26,9 +26,9 @@ if [[ -d "$ZDOTDIR/autoload" ]]; then [[ ${d:t} != wrapper ]] || continue fpath=("$d" $fpath) - autoload -Uz -- "" "$d"/[^_.]*(.xN:t) + autoload -Uz -- "" "$d"/[^_.]*(xN^/:t) done fpath=("$ZDOTDIR/autoload" $fpath) - autoload -Uz -- "" "${fpath[1]}"/[^_.]*(.xN:t) + autoload -Uz -- "" "${fpath[1]}"/[^_.]*(xN^/:t) fi