1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-02 22:11:54 +02:00

53449: do not complete indices for empty array subscripts

This commit is contained in:
Kyle Andelin 2025-04-04 07:53:57 -07:00 committed by Oliver Kiddle
parent 5858f6a122
commit 73c70cece0
2 changed files with 6 additions and 0 deletions

View file

@ -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

View file

@ -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