From 344d471c26aab7b042bf1b9a13d3fa11e5dbfba0 Mon Sep 17 00:00:00 2001 From: Bart Schaefer Date: Wed, 8 Sep 2021 16:03:57 -0700 Subject: 49389: leading variables in autoload file completion --- Completion/Zsh/Command/_typeset | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Completion') diff --git a/Completion/Zsh/Command/_typeset b/Completion/Zsh/Command/_typeset index d3304bed0..058842378 100644 --- a/Completion/Zsh/Command/_typeset +++ b/Completion/Zsh/Command/_typeset @@ -101,9 +101,9 @@ if [[ "$state" = vars_eq ]]; then elif (( $+opt_args[-w] )); then _wanted files expl 'zwc file' _files -g '*.zwc(-.)' && ret=0 elif [[ $service = autoload || -n $opt_args[(i)-[uU]] ]]; then - if [[ $PREFIX[1] = [/~] ]]; then + if [[ ${"${(e)PREFIX}"[1]} = [/~] ]] && _files; then # Autoload by absolute path - _files && ret=0 + ret=0 else args=(${^fpath}/*(-.:t)) # Filter out functions already loaded or marked for autoload. -- cgit 1.4.1