Expand description
Array subscript parsing and indexing for zshrs
Direct port from zsh/Src/params.c getindex() and getarg() functions.
Handles array subscript syntax including:
- Simple indices:
arr[1],arr[-1] - Ranges:
arr[1,5],arr[2,-1] - All elements:
arr[@],arr[*] - Subscript flags:
arr[(r)pattern],arr[(i)string], etc.
Modules§
- scanflags
- Scan flags for parameter matching Port from zsh.h SCANPM_* constants
- valflags
- Value flags Port from zsh.h VALFLAG_* constants
Structs§
- Subscript
Value - Subscript value result Port from zsh Value struct fields relevant to subscripting
Functions§
- get_
array_ by_ subscript - Get array elements by subscript Port from array access logic in params.c
- get_
array_ element_ by_ subscript - Get single array element by subscript
- getindex
- Parse array index subscript Port from getindex() in zsh/Src/params.c (lines 2001-2168)