aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBart Schaefer <schaefer@ipost.com>2021-09-08 16:03:57 -0700
committerBart Schaefer <schaefer@ipost.com>2021-09-08 16:03:57 -0700
commit344d471c26aab7b042bf1b9a13d3fa11e5dbfba0 (patch)
treeb7916fd39ab0e2a93fe6d56df2960b14351f0bcd
parentc4d07b3ec0415fa04c490f2f5233194d44da1c7a (diff)
downloadzsh-344d471c26aab7b042bf1b9a13d3fa11e5dbfba0.tar.gz
zsh-344d471c26aab7b042bf1b9a13d3fa11e5dbfba0.tar.xz
zsh-344d471c26aab7b042bf1b9a13d3fa11e5dbfba0.zip
49389: leading variables in autoload file completion
-rw-r--r--ChangeLog3
-rw-r--r--Completion/Zsh/Command/_typeset4
2 files changed, 5 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index ae0bfccc0..35f337f6e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2021-09-08 Bart Schaefer <schaefer@zsh.org>
+ * 49389: Completion/Zsh/Command/_typeset: leading variables in
+ autoload file completion
+
* 49387: Src/Zle/zle_misc.c: suffix highlight with "compadd -R"
* 49386: Test/Z03run-help.ztst: handle separate source/build trees
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.