From 6095cde035af792fa3a4bdf072aaf8ae43795c43 Mon Sep 17 00:00:00 2001 From: Evan Date: Fri, 8 Dec 2023 20:21:39 +1100 Subject: [PATCH] Use -Uz when loading zsh function --- argcomplete/bash_completion.d/_python-argcomplete | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/argcomplete/bash_completion.d/_python-argcomplete b/argcomplete/bash_completion.d/_python-argcomplete index ccf9b53..b29d9cd 100644 --- a/argcomplete/bash_completion.d/_python-argcomplete +++ b/argcomplete/bash_completion.d/_python-argcomplete @@ -241,7 +241,9 @@ _python_argcomplete_global() { if [[ -z "${ZSH_VERSION-}" ]]; then complete -o default -o bashdefault -D -F _python_argcomplete_global else - autoload is-at-least + # -Uz is recommended for the use of functions supplied with the zsh distribution. + # https://unix.stackexchange.com/a/214306 + autoload -Uz is-at-least # The comment at the top of this file causes zsh to invoke this script directly, # so we must explicitly call the global completion function. _python_argcomplete_global