Expand description
Parameter management for zshrs
Port from zsh/Src/params.c (6511 lines → full Rust port)
Provides shell parameters (variables), special parameters, arrays, associative arrays, parameter attributes, namerefs, scoping, tied parameters, and all special parameter get/set functions.
Modules§
Structs§
Enums§
Constants§
- PM_
TYPES - SPECIAL_
PARAMS - All special parameters from params.c special_params[]
Functions§
- array_
to_ colonarr - Array to colon-separated path
- assignaparam
- Assign array parameter (from params.c assignaparam)
- assignfparam
- Assign float parameter
- assignhparam
- Assign hash parameter (from params.c sethparam)
- assigniparam
- Assign integer parameter (from params.c assigniparam)
- assignsparam
- Assign string parameter (from params.c assignsparam)
- colonarr_
to_ array - Colon-separated path to array
- convbase
- Convert integer to string with base (from params.c convbase)
- convbase_
underscore - Convert integer to string with underscores for readability
- convfloat_
underscore - Format float with underscores
- endparamscope
- End a parameter scope
- export_
param - Export parameter to environment
- format_
float - Format a float value for output (from params.c convfloat)
- get_
array_ element - Get single array element by index (handles ksh_arrays)
- get_
array_ slice - Get array slice based on subscript index
- getaparam
- Get array parameter (from params.c getaparam)
- getarrvalue
- Get array element with subscript handling (from params.c getarrvalue)
- gethkparam
- Get hash parameter keys as array (from params.c gethkparam)
- gethparam
- Get hash parameter values as array (from params.c gethparam)
- getiparam
- Get integer parameter value (from params.c getiparam)
- getnparam
- Get numeric parameter (from params.c getnparam)
- getsparam
- Get scalar (string) parameter (from params.c getsparam)
- getsparam_
u - Get scalar with default
- intgetfn
- Integer parameter with base formatting (from params.c intgetfn)
- isexported
- Check if parameter is exported
- isident
- Check if string is valid identifier (from params.c isident)
- isreadonly
- Check if parameter is readonly
- isset_
param - Check if parameter is set
- paramtype
- Get parameter type flags
- parse_
simple_ subscript - Parse simple subscript - extract index from
[n]or[m,n]syntax - parse_
subscript - Parse a subscript expression like
[1],[1,5],[@],[*] - parse_
subscription_ flags - Parse subscription flags from (flags) prefix
- setarrvalue
- Set array element with subscript handling (from params.c setarrvalue)
- startparamscope
- Start a parameter scope
- strgetfn
- String parameter with modifiers (from params.c strgetfn)
- unexport_
param - Unexport parameter
- uniq_
array - Remove duplicate elements from array while preserving order
- unsetparam
- Unset parameter (from params.c unsetparam)
- valid_
refname - Validate nameref target name (from valid_refname)