Skip to main content

Module params

Module params 

Source
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§

assign_flags
flags
print_flags
scan_flags
val_flags

Structs§

Param
ParamTable
ParamTypeInfo
SpecialParamDef
SubscriptFlags
SubscriptIndex
TiedData
Value

Enums§

MNumber
ParamValue

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)