From 73c70cece07a9d9e69cf09871877ab28b06d5cfb Mon Sep 17 00:00:00 2001 From: Kyle Andelin <7277377+andelink@users.noreply.github.com> Date: Fri, 4 Apr 2025 07:53:57 -0700 Subject: 53449: do not complete indices for empty array subscripts --- Completion/Zsh/Context/_subscript | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Completion/Zsh') diff --git a/Completion/Zsh/Context/_subscript b/Completion/Zsh/Context/_subscript index 25cedd193..67bad2862 100644 --- a/Completion/Zsh/Context/_subscript +++ b/Completion/Zsh/Context/_subscript @@ -98,6 +98,9 @@ elif [[ ${(Pt)${compstate[parameter]}} = array* ]]; then while _tags; do if _requested indexes; then ind=( {1..${#${(P)${compstate[parameter]}}}} ) + if [[ ${ind[-1]} -eq 0 ]]; then + ind=() + fi if zstyle -T ":completion:${curcontext}:indexes" verbose; then list=() for i in "$ind[@]"; do -- cgit v1.2.3-70-g09d2