diff options
author | Kyle Andelin <7277377+andelink@users.noreply.github.com> | 2025-04-04 07:53:57 -0700 |
---|---|---|
committer | Oliver Kiddle <opk@zsh.org> | 2025-04-04 20:57:51 +0200 |
commit | 73c70cece07a9d9e69cf09871877ab28b06d5cfb (patch) | |
tree | fe61c9e6ea6f5d564c676c06f2e0abd30fae41e0 | |
parent | 5858f6a12252eb82b7b5942e64dd8679854f0063 (diff) | |
download | zsh-73c70cece07a9d9e69cf09871877ab28b06d5cfb.tar.gz zsh-73c70cece07a9d9e69cf09871877ab28b06d5cfb.zip |
53449: do not complete indices for empty array subscripts
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | Completion/Zsh/Context/_subscript | 3 |
2 files changed, 6 insertions, 0 deletions
@@ -1,5 +1,8 @@ 2025-04-04 Oliver Kiddle <opk@zsh.org> + * Kyle Andelin: 53449: Completion/Zsh/Context/_subscript: + do not complete indices for empty array subscripts + * 53445: Completion/Unix/Type/_path_commands: extra-verbose mode support on some recent Linux and BSD systems 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 |