Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] _main_complete: mark some parameters as global
- X-seq: zsh-workers 54926
- From: dana <dana@xxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH] _main_complete: mark some parameters as global
- Date: Wed, 08 Jul 2026 16:39:46 -0500
- Archived-at: <https://zsh.org/workers/54926>
- Feedback-id: i9be146f9:Fastmail
- List-id: <zsh-workers.zsh.org>
i've been setting warn_create_global in _comp_options to help with bug
detection (oliver thought it would be problematic to change it for
everyone), and it warns about these. afaik it's not an issue in this
case, but i'd like to silence them
dana
diff --git a/Completion/Base/Core/_main_complete b/Completion/Base/Core/_main_complete
index 11b7972de..b0c2db5b7 100644
--- a/Completion/Base/Core/_main_complete
+++ b/Completion/Base/Core/_main_complete
@@ -305,7 +305,7 @@ if [[ $compstate[old_list] = keep || nm -gt 1 ]]; then
elif [[ -n "$_menu_style[(r)select=long*]" ]]; then
if [[ tmp -gt LINES ]]; then
zmodload -i zsh/complist
- MENUSELECT=00
+ typeset -g MENUSELECT=00
fi
fi
if [[ "$MENUSELECT" != 00 ]]; then
@@ -328,19 +328,19 @@ if [[ $compstate[old_list] = keep || nm -gt 1 ]]; then
done
zmodload -i zsh/complist
- MENUSELECT="$min"
+ typeset -g MENUSELECT="$min"
else
unset MENUSELECT
fi
fi
if [[ -n "$MENUSELECT" ]]; then
if [[ -n "$_menu_style[(r)interactive*]" ]]; then
- MENUMODE=interactive
+ typeset -g MENUMODE=interactive
elif [[ -n "$_menu_style[(r)search*]" ]]; then
if [[ -n "$_menu_style[(r)*backward*]" ]]; then
- MENUMODE=search-backward
+ typeset -g MENUMODE=search-backward
else
- MENUMODE=search-forward
+ typeset -g MENUMODE=search-forward
fi
else
unset MENUMODE
@@ -385,12 +385,12 @@ fi
# Stuff we always do to clean up.
if [[ "$compstate[old_list]" = keep ]]; then
if [[ $_saved_colors_set = 1 ]]; then
- ZLS_COLORS="$_saved_colors"
+ typeset -g ZLS_COLORS="$_saved_colors"
else
unset ZLS_COLORS
fi
elif (( $#_comp_colors )); then
- ZLS_COLORS="${(j.:.)_comp_colors}"
+ typeset -g ZLS_COLORS="${(j.:.)_comp_colors}"
else
unset ZLS_COLORS
fi
Messages sorted by:
Reverse Date,
Date,
Thread,
Author