Expand description
parameter submodule.
Parameter interface to shell internals - port of Modules/parameter.c
Functions for the parameters special parameter. // c:37 Return a string describing the type of a parameter. // c:39 Functions for the commands special parameter. // c:147 Functions for the functions special parameter. // c:280 Functions for the builtins special parameter. // c:771 Functions for the options special parameter. // c:922 Functions for the modules special parameter. // c:1036 Functions for the history special parameter. // c:1152 Table for defined parameters. // c:2177
Provides special parameters: $commands, $functions, $aliases, $builtins, $modules, $dirstack, $history, $historywords, $options, $nameddirs, $userdirs
Structs§
- Partab
Array Entry - Strongly-typed entry for PM_ARRAY-shape magic-assocs.
- Partab
Hash Entry - Strongly-typed PARTAB entry. C’s
paramdefkeeps these as opaque pointers; Rust’s static-initialization rules make explicit fn pointers cleaner. Only the magic-assoc shape (PM_HASHED) is populated here; PM_ARRAY entries (dirstack,funcstack,patchars,reswords, etc.) need a separate ArrayGetFn type. - pardef
- Port of
struct pardeffromSrc/Modules/parameter.c:2179. The per-magic-assoc parameter spec table — one entry per${parameters}/${commands}/${functions}/etc. exposed by thezsh/parametermodule.
Statics§
- DIRSTACK
DIRSTACKstatic.- FUNCSTACK
FUNCSTACKstatic.- INCLEANUP
INCLEANUPstatic.- PARTAB
static const struct paramdef partab[]fromSrc/Modules/parameter.c: 2235-2298. Each entry binds a magic-assoc name to its per-key/full-scan canonical callbacks. The PM_ARRAY entries (dirstack/funcstack/patchars/reswords/historywords/etc.) aren’t included here — they live in a separatePARTAB_ARRAYonce the array-shaped getfn types land.- PARTAB_
ARRAY static const struct paramdef partab[]PM_ARRAY subset fromSrc/Modules/parameter.c:2239-2291. Each entry’sgsu_array.getfnreturns the full array (no per-key dispatch).
Functions§
- assignaliasdefs
- Port of
assignaliasdefs()fromSrc/Modules/parameter.c:1867— C declassignaliasdefs(Param pm, int flags). C signature:static void assignaliasdefs(Param pm, int flags). C body setspm->node.flags = PM_SCALAR(c:1869) then dispatchespm->gsu.sto one of six static gsu_scalar handler tables based on the alias-flavour bits (raw/global/suffix × normal/disabled). Thegsu_scalarstruct IS ported at zsh_h.rs:802 (withGsuScalar= Box<gsu_scalar> alias at c:794), but C uses six C-level statics for the per-flavour dispatch tables —pmralias_gsu,pmgalias_gsu,pmsalias_gsu, plus the threepmdis*alias_gsuvariants — that can’t be const-initialised in Rust because gsu_scalar holdsOption<GsuFn>function pointers. Until the six per-flavour statics land asLazyLock<gsu_scalar>entries, the flag-to-handler mapping is recorded in a name-keyed side-map so future gsu lookups resolve the right handler. - boot_
- Port of
boot_()fromSrc/Modules/parameter.c:2341— C declboot_(UNUSED(Module m)). - cleanup_
- Port of
cleanup_()fromSrc/Modules/parameter.c:2348— C declcleanup_(Module m). C body c:2350-2354 — wrap setfeatureenables(NULL) with incleanup=1/0 matching the same guard enables_ uses. - dirsgetfn
- Port of
dirsgetfn()fromSrc/Modules/parameter.c:1147— C decldirsgetfn(UNUSED(Param pm)). C:static char **dirsgetfn(UNUSED(Param pm))→return hlinklist2array(dirstack, 1); - dirssetfn
- Port of
dirssetfn()fromSrc/Modules/parameter.c:1131— C decldirssetfn(UNUSED(Param pm), char **x). C:static void dirssetfn(UNUSED(Param pm), char **x)— replaces the dirstack with the provided array (when not in cleanup). - dispatcharsgetfn
- Port of
dispatcharsgetfn()fromSrc/Modules/parameter.c:917— C decldispatcharsgetfn(UNUSED(Param pm)). C:static char **dispatcharsgetfn(UNUSED(Param pm))→return getpatchars(1); - disreswordsgetfn
- Port of
disreswordsgetfn()fromSrc/Modules/parameter.c:885— C decldisreswordsgetfn(UNUSED(Param pm)). C:static char **disreswordsgetfn(UNUSED(Param pm))→return getreswords(DISABLED); - enables_
- Port of
enables_()fromSrc/Modules/parameter.c:2326— C declenables_(Module m, int **enables). C body c:2328-2336 — wrap handlefeatures() with incleanup=1/0 so that any feature removal does not perturb the main shell’s parameter table. - features_
- Port of
features_()fromSrc/Modules/parameter.c:2318— C declfeatures_(Module m, char ***features). - finish_
- Port of
finish_()fromSrc/Modules/parameter.c:2359— C declfinish_(UNUSED(Module m)). - funcfiletracegetfn
- Port of
funcfiletracegetfn()fromSrc/Modules/parameter.c:711— C declfuncfiletracegetfn(UNUSED(Param pm)). Walksfuncstackbuilding a"<file>:<lineno>"pair per frame. For function/eval frames the line number is computed against the parent frame’s source-file line. - funcsourcetracegetfn
- Port of
funcsourcetracegetfn()fromSrc/Modules/parameter.c:679— C declstatic char **funcsourcetracegetfn(UNUSED(Param pm)). Same shape asfunctracegetfnbut usesf->filename/f->flineno(the source location, not the caller location). - funcstackgetfn
- Port of
funcstackgetfn()fromSrc/Modules/parameter.c:627— C declfuncstackgetfn(UNUSED(Param pm)). C:static char **funcstackgetfn(UNUSED(Param pm))— returns the list of function names currently on the call stack. - functracegetfn
- Port of
functracegetfn()fromSrc/Modules/parameter.c:648— C declstatic char **functracegetfn(UNUSED(Param pm)). Walks thefuncstacklinked list, building"<caller>:<lineno>"per frame. - getalias
- Port of
getalias()fromSrc/Modules/parameter.c:1901— C declgetalias(HashTable alht, UNUSED(HashTable ht), const char *name, int flags). C body (c:1906-1919): - getbuiltin
- Port of
getbuiltin()fromSrc/Modules/parameter.c:775— C declgetbuiltin(UNUSED(HashTable ht), const char *name, int dis). C body (c:778-796): - getfunction
- Port of
getfunction()fromSrc/Modules/parameter.c:389— C declgetfunction(UNUSED(HashTable ht), const char *name, int dis). C body (c:392-441): - getfunction_
source - Port of
getfunction_source()fromSrc/Modules/parameter.c:537— C declgetfunction_source(UNUSED(HashTable ht), const char *name, int dis). C:static HashNode getfunction_source(UNUSED(HashTable ht), const char *name, int dis)— synth a Param naming the source file. WARNING: param names don’t match C — Rust=() vs C=(ht, name, dis) - getpmbuiltin
- Port of
getpmbuiltin()fromSrc/Modules/parameter.c:799— C declgetpmbuiltin(HashTable ht, const char *name). C:static HashNode getpmbuiltin(HashTable ht, const char *name)→return getbuiltin(ht, name, 0); - getpmcommand
- Port of
getpmcommand()fromSrc/Modules/parameter.c:213— C declgetpmcommand(UNUSED(HashTable ht), const char *name). C body (c:216-241): - getpmdisbuiltin
- Port of
getpmdisbuiltin()fromSrc/Modules/parameter.c:806— C declgetpmdisbuiltin(HashTable ht, const char *name). C:static HashNode getpmdisbuiltin(HashTable ht, const char *name)→return getbuiltin(ht, name, DISABLED); - getpmdisfunction
- Port of
getpmdisfunction()fromSrc/Modules/parameter.c:451— C declgetpmdisfunction(HashTable ht, const char *name). C:static HashNode getpmdisfunction(HashTable ht, const char *name)→return getfunction(ht, name, DISABLED); - getpmdisfunction_
source - Port of
getpmdisfunction_source()fromSrc/Modules/parameter.c:600— C declgetpmdisfunction_source(HashTable ht, const char *name). C:static HashNode getpmdisfunction_source(HashTable ht, const char *name)→return getfunction_source(ht, name, 1);WARNING: param names don’t match C — Rust=() vs C=(ht, name) - getpmdisgalias
- Port of
getpmdisgalias()fromSrc/Modules/parameter.c:1944— C declgetpmdisgalias(HashTable ht, const char *name). C:static HashNode getpmdisgalias(HashTable ht, const char *name)→return getalias(aliastab, ht, name, ALIAS_GLOBAL|DISABLED); - getpmdisralias
- Port of
getpmdisralias()fromSrc/Modules/parameter.c:1930— C declgetpmdisralias(HashTable ht, const char *name). C:static HashNode getpmdisralias(HashTable ht, const char *name)→return getalias(aliastab, ht, name, DISABLED); - getpmdissalias
- Port of
getpmdissalias()fromSrc/Modules/parameter.c:1958— C declgetpmdissalias(HashTable ht, const char *name). C:static HashNode getpmdissalias(HashTable ht, const char *name)→return getalias(sufaliastab, ht, name, ALIAS_SUFFIX|DISABLED); - getpmfunction
- Port of
getpmfunction()fromSrc/Modules/parameter.c:444— C declgetpmfunction(HashTable ht, const char *name). C:static HashNode getpmfunction(HashTable ht, const char *name)→return getfunction(ht, name, 0); - getpmfunction_
source - Port of
getpmfunction_source()fromSrc/Modules/parameter.c:591— C declgetpmfunction_source(HashTable ht, const char *name). C:static HashNode getpmfunction_source(HashTable ht, const char *name)→return getfunction_source(ht, name, 0); - getpmgalias
- Port of
getpmgalias()fromSrc/Modules/parameter.c:1937— C declgetpmgalias(HashTable ht, const char *name). C:static HashNode getpmgalias(HashTable ht, const char *name)→return getalias(aliastab, ht, name, ALIAS_GLOBAL); - getpmhistory
- Port of
getpmhistory()fromSrc/Modules/parameter.c:1156— C declgetpmhistory(UNUSED(HashTable ht), const char *name). C body (c:1159-1206): quietgetn(name) → histnum; getHistEnt(num) → histent; emitpm.u.str = histent->text. - getpmjobdir
- Port of
getpmjobdir()fromSrc/Modules/parameter.c:1457— C declgetpmjobdir(UNUSED(HashTable ht), const char *name). - getpmjobstate
- Port of
getpmjobstate()fromSrc/Modules/parameter.c:1385— C declgetpmjobstate(UNUSED(HashTable ht), const char *name). - getpmjobtext
- Port of
getpmjobtext()fromSrc/Modules/parameter.c:1277— C declgetpmjobtext(UNUSED(HashTable ht), const char *name). - getpmmodule
- Port of
getpmmodule()fromSrc/Modules/parameter.c:1040— C declgetpmmodule(UNUSED(HashTable ht), const char *name). Static-link path returns an empty PM_SPECIAL Param — modules are statically linked in zshrs (no runtime module table). - getpmnameddir
- Port of
getpmnameddir()fromSrc/Modules/parameter.c:1597— C declgetpmnameddir(UNUSED(HashTable ht), const char *name). C body (c:1600-1615): - getpmoption
- Port of
getpmoption()fromSrc/Modules/parameter.c:988— C declgetpmoption(UNUSED(HashTable ht), const char *name). C:static HashNode getpmoption(UNUSED(HashTable ht), const char *name)— emit “on”/“off” for the named shell option. - getpmparameter
- Port of
getpmparameter()fromSrc/Modules/parameter.c:99— C declgetpmparameter(UNUSED(HashTable ht), const char *name). C body (c:102-210):paramtab[name]lookup; emit a scalar Param whose value is the type-letter encoding (scalar,array,association,integer,float, plus-readonly/-export/ etc. modifiers per PM_* flags). - getpmralias
- Port of
getpmralias()fromSrc/Modules/parameter.c:1923— C declgetpmralias(HashTable ht, const char *name). C:static HashNode getpmralias(HashTable ht, const char *name)→return getalias(aliastab, ht, name, 0); - getpmsalias
- Port of
getpmsalias()fromSrc/Modules/parameter.c:1951— C declgetpmsalias(HashTable ht, const char *name). C:static HashNode getpmsalias(HashTable ht, const char *name)→return getalias(sufaliastab, ht, name, ALIAS_SUFFIX); - getpmuserdir
- Port of
getpmuserdir()fromSrc/Modules/parameter.c:1646— C declgetpmuserdir(UNUSED(HashTable ht), const char *name). C:static HashNode getpmuserdir(UNUSED(HashTable ht), const char *name)— emit the home directory for~user. - getpmusergroups
- Port of
getpmusergroups()fromSrc/Modules/parameter.c:2102— C declgetpmusergroups(UNUSED(HashTable ht), const char *name). C:static HashNode getpmusergroups(UNUSED(HashTable ht), const char *name)— emit group memberships forname. - histwgetfn
- Port of
histwgetfn()fromSrc/Modules/parameter.c:1217— C declstatic char **histwgetfn(UNUSED(Param pm)). The$historywordsarray getter. C body c:1224-1226 prependsbufferwords(NULL, NULL, NULL, 0)(current editor line) to the result, then walks the history ring newest→oldest slicing each entry’s words via thehistent.words[](begin,end) byte-offset pairs in reverse position order. - paramtypestr
- Port of
paramtypestr()fromSrc/Modules/parameter.c:43— C declparamtypestr(Param pm). C:static char *paramtypestr(Param pm)— render a parameter’s type and modifier flags as thetypeset -pflag string. - patcharsgetfn
- Port of
patcharsgetfn()fromSrc/Modules/parameter.c:911— C declpatcharsgetfn(UNUSED(Param pm)). C:static char **patcharsgetfn(UNUSED(Param pm))→return getpatchars(0); - pmjobdir
- Port of
pmjobdir()fromSrc/Modules/parameter.c:1447— C declpmjobdir(Job jtab, int job). C:static char *pmjobdir(Job jtab, int job)→return dupstring(jtab[job].pwd ? jtab[job].pwd : pwd); - pmjobstate
- Port of
pmjobstate()fromSrc/Modules/parameter.c:1340— C declpmjobstate(Job jtab, int job). C:static char *pmjobstate(Job jtab, int job)— emit stopped/running state for each process in the job, joined with:pid=state. - pmjobtext
- Port of
pmjobtext()fromSrc/Modules/parameter.c:1255— C declpmjobtext(Job jtab, int job). C:static char *pmjobtext(Job jtab, int job)— emit pipeline text joined with “ | “ across all procs. - reswordsgetfn
- Port of
reswordsgetfn()fromSrc/Modules/parameter.c:878— C declreswordsgetfn(UNUSED(Param pm)). C:static char **reswordsgetfn(UNUSED(Param pm))→return getreswords(0); - scanaliases
- Port of
scanaliases()fromSrc/Modules/parameter.c:1965— C declscanaliases(HashTable alht, UNUSED(HashTable ht), ScanFunc func, int pmflags, int alflags). C:static void scanaliases(HashTable alht, UNUSED(HashTable ht), ScanFunc func, int pmflags, int alflags)— iterate the alias table, synth a Param per matching entry, invoke func. WARNING: param names don’t match C — Rust=(_alht, _ht, pmflags, alflags) vs C=(alht, ht, func, pmflags, alflags) - scanbuiltins
- Port of
scanbuiltins()fromSrc/Modules/parameter.c:813— C declscanbuiltins(UNUSED(HashTable ht), ScanFunc func, int flags, int dis). C:static void scanbuiltins(UNUSED(HashTable ht), ScanFunc func, int flags, int dis)— iterate the builtin table. WARNING: param names don’t match C — Rust=(_ht, func, _dis) vs C=(ht, func, flags, dis) - scanfunctions
- Port of
scanfunctions()fromSrc/Modules/parameter.c:458— C declscanfunctions(UNUSED(HashTable ht), ScanFunc func, int flags, int dis). C:static void scanfunctions(UNUSED(HashTable ht), ScanFunc func, int flags, int dis)— iterate shfunctab. WARNING: param names don’t match C — Rust=(_ht, func, _dis) vs C=(ht, func, flags, dis) - scanfunctions_
source - Port of
scanfunctions_source()fromSrc/Modules/parameter.c:560— C declscanfunctions_source(UNUSED(HashTable ht), ScanFunc func, int flags, int dis). C:static void scanfunctions_source(UNUSED(HashTable ht), ScanFunc func, int flags, int dis)— iterate shfunctab, emit source filename. WARNING: param names don’t match C — Rust=(_ht, func, _dis) vs C=(ht, func, flags, dis) - scanpmbuiltins
- Port of
scanpmbuiltins()fromSrc/Modules/parameter.c:843— C declscanpmbuiltins(HashTable ht, ScanFunc func, int flags). C:static void scanpmbuiltins(HashTable ht, ScanFunc func, int flags)→scanbuiltins(ht, func, flags, 0);WARNING: param names don’t match C — Rust=(ht, func) vs C=(ht, func, flags) - scanpmcommands
- Port of
scanpmcommands()fromSrc/Modules/parameter.c:245— C declscanpmcommands(UNUSED(HashTable ht), ScanFunc func, int flags). C body (c:248-280): - scanpmdisbuiltins
- Port of
scanpmdisbuiltins()fromSrc/Modules/parameter.c:850— C declscanpmdisbuiltins(HashTable ht, ScanFunc func, int flags). C:static void scanpmdisbuiltins(HashTable ht, ScanFunc func, int flags)→scanbuiltins(ht, func, flags, DISABLED);WARNING: param names don’t match C — Rust=(ht, func) vs C=(ht, func, flags) - scanpmdisfunction_
source - Port of
scanpmdisfunction_source()fromSrc/Modules/parameter.c:618— C declscanpmdisfunction_source(HashTable ht, ScanFunc func, int flags). C:static void scanpmdisfunction_source(HashTable ht, ScanFunc func, int flags)→scanfunctions_source(ht, func, flags, 1);WARNING: param names don’t match C — Rust=(ht, flags) vs C=(ht, func, flags) - scanpmdisfunctions
- Port of
scanpmdisfunctions()fromSrc/Modules/parameter.c:526— C declscanpmdisfunctions(HashTable ht, ScanFunc func, int flags). C:static void scanpmdisfunctions(HashTable ht, ScanFunc func, int flags)→scanfunctions(ht, func, flags, DISABLED);WARNING: param names don’t match C — Rust=(ht, func) vs C=(ht, func, flags) - scanpmdisgaliases
- Port of
scanpmdisgaliases()fromSrc/Modules/parameter.c:2011— C declscanpmdisgaliases(HashTable ht, ScanFunc func, int flags). WARNING: param names don’t match C — Rust=(ht, func) vs C=(ht, func, flags) - scanpmdisraliases
- Port of
scanpmdisraliases()fromSrc/Modules/parameter.c:1997— C declscanpmdisraliases(HashTable ht, ScanFunc func, int flags). WARNING: param names don’t match C — Rust=(ht, func) vs C=(ht, func, flags) - scanpmdissaliases
- Port of
scanpmdissaliases()fromSrc/Modules/parameter.c:2025— C declscanpmdissaliases(HashTable ht, ScanFunc func, int flags). WARNING: param names don’t match C — Rust=(ht, func) vs C=(ht, func, flags) - scanpmfunction_
source - Port of
scanpmfunction_source()fromSrc/Modules/parameter.c:609— C declscanpmfunction_source(HashTable ht, ScanFunc func, int flags). WARNING: param names don’t match C — Rust=(ht, func) vs C=(ht, func, flags) - scanpmfunctions
- Port of
scanpmfunctions()fromSrc/Modules/parameter.c:519— C declscanpmfunctions(HashTable ht, ScanFunc func, int flags). WARNING: param names don’t match C — Rust=(ht, func) vs C=(ht, func, flags) - scanpmgaliases
- Port of
scanpmgaliases()fromSrc/Modules/parameter.c:2004— C declscanpmgaliases(HashTable ht, ScanFunc func, int flags). WARNING: param names don’t match C — Rust=(ht, func) vs C=(ht, func, flags) - scanpmhistory
- Port of
scanpmhistory()fromSrc/Modules/parameter.c:1188— C declscanpmhistory(UNUSED(HashTable ht), ScanFunc func, int flags). - scanpmjobdirs
- Port of
scanpmjobdirs()fromSrc/Modules/parameter.c:1487— C declscanpmjobdirs(UNUSED(HashTable ht), ScanFunc func, int flags). - scanpmjobstates
- Port of
scanpmjobstates()fromSrc/Modules/parameter.c:1415— C declscanpmjobstates(UNUSED(HashTable ht), ScanFunc func, int flags). - scanpmjobtexts
- Port of
scanpmjobtexts()fromSrc/Modules/parameter.c:1308— C declscanpmjobtexts(UNUSED(HashTable ht), ScanFunc func, int flags). - scanpmmodules
- Port of
scanpmmodules()fromSrc/Modules/parameter.c:1074— C declscanpmmodules(UNUSED(HashTable ht), ScanFunc func, int flags). - scanpmnameddirs
- Port of
scanpmnameddirs()fromSrc/Modules/parameter.c:1618— C declscanpmnameddirs(UNUSED(HashTable ht), ScanFunc func, int flags). C body (c:1621-1641): - scanpmoptions
- Port of
scanpmoptions()fromSrc/Modules/parameter.c:1016— C declscanpmoptions(UNUSED(HashTable ht), ScanFunc func, int flags). C body walks the optns[] table emitting “on”/“off” for each option. WARNING: param names don’t match C — Rust=(_ht, func) vs C=(ht, func, flags) - scanpmparameters
- Port of
scanpmparameters()fromSrc/Modules/parameter.c:124— C declscanpmparameters(UNUSED(HashTable ht), ScanFunc func, int flags). - scanpmraliases
- Port of
scanpmraliases()fromSrc/Modules/parameter.c:1990— C declscanpmraliases(HashTable ht, ScanFunc func, int flags). WARNING: param names don’t match C — Rust=(ht, func) vs C=(ht, func, flags) - scanpmsaliases
- Port of
scanpmsaliases()fromSrc/Modules/parameter.c:2018— C declscanpmsaliases(HashTable ht, ScanFunc func, int flags). WARNING: param names don’t match C — Rust=(ht, func) vs C=(ht, func, flags) - scanpmuserdirs
- Port of
scanpmuserdirs()fromSrc/Modules/parameter.c:1669— C declscanpmuserdirs(UNUSED(HashTable ht), ScanFunc func, int flags). C body (c:1672-1696): same nameddirtab walk filtered to entries with ND_USERNAME set. Static-link path enumerates getpwent(3) — every passwd entry is a “user dir” by definition. WARNING: param names don’t match C — Rust=(_ht, func) vs C=(ht, func, flags) - scanpmusergroups
- Port of
scanpmusergroups()fromSrc/Modules/parameter.c:2143— C declscanpmusergroups(UNUSED(HashTable ht), ScanFunc func, int flags). C body (c:2146-2169): get_all_groups() returns Groupset; walk gs->array emitting each group name. Static-link path uses getgrent(3) — same data source. WARNING: param names don’t match C — Rust=(_ht, func) vs C=(ht, func, flags) - setalias
- Port of
setalias()fromSrc/Modules/parameter.c:1699— C declsetalias(HashTable ht, Param pm, char *value, int flags). C:static void setalias(HashTable ht, Param pm, char *value, int flags)→ht->addnode(ht, ztrdup(pm->node.nam), createaliasnode(value, flags));WARNING: param names don’t match C — Rust=(_ht, _pm, _value) vs C=(ht, pm, value, flags) - setaliases
- Port of
setaliases()fromSrc/Modules/parameter.c:1769— C declstatic void setaliases(HashTable alht, Param pm, HashTable ht, int flags). Implements the “replace every alias of the given flag-class with the entries ofht” semantics that drive$raliases=(...),$dis_raliases=(...),$galiases=(...),$dis_galiases=(...)assignment. - setfunction
- Port of
setfunction()fromSrc/Modules/parameter.c:284— C declsetfunction(char *name, char *val, int dis). C:static void setfunction(char *name, char *val, int dis)— install a shell function from text source. - setfunctions
- Port of
setfunctions()fromSrc/Modules/parameter.c:344— C declsetfunctions(Param pm, HashTable ht, int dis). C:static void setfunctions(Param pm, HashTable ht, int dis)— install all functions inht. WARNING: param shape doesn’t match C — C passes the temporary HashTable of value-carrying child Params (see setpmcommands); zshrs passes the (key, value) pairs directly. Additive: existing functions are NOT flushed. - setpmcommand
- Port of
setpmcommand()fromSrc/Modules/parameter.c:151— C declsetpmcommand(Param pm, char *value). C:static void setpmcommand(Param pm, char *value)— register a path alias in cmdnamtab for the named command. - setpmcommands
- Port of
setpmcommands()fromSrc/Modules/parameter.c:173— C declsetpmcommands(Param pm, HashTable ht). C:static void setpmcommands(Param pm, HashTable ht)— bulk install. WARNING: param shape doesn’t match C — C passes the temporary HashTable built byarrhashsetfn(Src/params.c:4113) whose nodes are child Params carrying values inu.str; zshrs’shashnodehas no value slot, so the (key, value) pairs are passed directly. The iteration semantics are identical: one install per pair, additive (existingcmdnamtabentries are NOT flushed). - setpmdisfunction
- Port of
setpmdisfunction()fromSrc/Modules/parameter.c:327— C declsetpmdisfunction(Param pm, char *value). C:setfunction(pm->node.nam, value, DISABLED); - setpmdisfunctions
- Port of
setpmdisfunctions()fromSrc/Modules/parameter.c:377— C declsetpmdisfunctions(Param pm, HashTable ht). C:setfunctions(pm, ht, DISABLED); - setpmdisgalias
- Port of
setpmdisgalias()fromSrc/Modules/parameter.c:1728— C declsetpmdisgalias(Param pm, char *value). C:setalias(aliastab, pm, value, ALIAS_GLOBAL|DISABLED); - setpmdisgaliases
- Port of
setpmdisgaliases()fromSrc/Modules/parameter.c:1833— C declsetpmdisgaliases(Param pm, HashTable ht). C:setaliases(aliastab, pm, ht, ALIAS_GLOBAL|DISABLED); - setpmdisralias
- Port of
setpmdisralias()fromSrc/Modules/parameter.c:1714— C declsetpmdisralias(Param pm, char *value). C:setalias(aliastab, pm, value, DISABLED); - setpmdisraliases
- Port of
setpmdisraliases()fromSrc/Modules/parameter.c:1819— C declsetpmdisraliases(Param pm, HashTable ht). - setpmdissalias
- Port of
setpmdissalias()fromSrc/Modules/parameter.c:1742— C declsetpmdissalias(Param pm, char *value). - setpmdissaliases
- Port of
setpmdissaliases()fromSrc/Modules/parameter.c:1847— C declsetpmdissaliases(Param pm, HashTable ht). - setpmfunction
- Port of
setpmfunction()fromSrc/Modules/parameter.c:320— C declsetpmfunction(Param pm, char *value). C:setfunction(pm->node.nam, value, 0); - setpmfunctions
- Port of
setpmfunctions()fromSrc/Modules/parameter.c:370— C declsetpmfunctions(Param pm, HashTable ht). - setpmgalias
- Port of
setpmgalias()fromSrc/Modules/parameter.c:1721— C declsetpmgalias(Param pm, char *value). - setpmgaliases
- Port of
setpmgaliases()fromSrc/Modules/parameter.c:1826— C declsetpmgaliases(Param pm, HashTable ht). - setpmnameddir
- Port of
setpmnameddir()fromSrc/Modules/parameter.c:1519— C declsetpmnameddir(Param pm, char *value). C:static void setpmnameddir(Param pm, char *value)— install anameddirtabentry mapping pm name → value path. - setpmnameddirs
- Port of
setpmnameddirs()fromSrc/Modules/parameter.c:1544— C declsetpmnameddirs(Param pm, HashTable ht). C:static void setpmnameddirs(Param pm, HashTable ht)— replacenameddirtab(preserving ND_USERNAME entries) withht’s contents. WARNING: param shape doesn’t match C — C passes the temporary HashTable of value-carrying child Params (see setpmcommands); zshrs passes the (key, value) pairs directly. Replace semantics: every non-ND_USERNAME named dir is flushed first (c:1552-1558). - setpmoption
- Port of
setpmoption()fromSrc/Modules/parameter.c:926— C declsetpmoption(Param pm, char *value). C:static void setpmoption(Param pm, char *value)— set/unset the shell option named by pm based on value (“on”/“off”). - setpmoptions
- Port of
setpmoptions()fromSrc/Modules/parameter.c:953— C declsetpmoptions(Param pm, HashTable ht). C:static void setpmoptions(Param pm, HashTable ht)— set or unset each shell option named inhtbased on its “on”/“off” value. WARNING: param shape doesn’t match C — C passes the temporary HashTable of value-carrying child Params (see setpmcommands); zshrs passes the (key, value) pairs directly. - setpmralias
- Port of
setpmralias()fromSrc/Modules/parameter.c:1707— C declsetpmralias(Param pm, char *value). - setpmraliases
- Port of
setpmraliases()fromSrc/Modules/parameter.c:1812— C declsetpmraliases(Param pm, HashTable ht). - setpmsalias
- Port of
setpmsalias()fromSrc/Modules/parameter.c:1735— C declsetpmsalias(Param pm, char *value). - setpmsaliases
- Port of
setpmsaliases()fromSrc/Modules/parameter.c:1840— C declsetpmsaliases(Param pm, HashTable ht). - setup_
- Port of
setup_()fromSrc/Modules/parameter.c:2311— C declsetup_(UNUSED(Module m)). - unsetpmalias
- Port of
unsetpmalias()fromSrc/Modules/parameter.c:1749— C declunsetpmalias(Param pm, UNUSED(int exp)). C:static void unsetpmalias(Param pm, UNUSED(int exp))— remove the named alias fromaliastab. - unsetpmcommand
- Port of
unsetpmcommand()fromSrc/Modules/parameter.c:163— C declunsetpmcommand(Param pm, UNUSED(int exp)). C:static void unsetpmcommand(Param pm, UNUSED(int exp))— remove the named entry fromcmdnamtab. - unsetpmfunction
- Port of
unsetpmfunction()fromSrc/Modules/parameter.c:334— C declunsetpmfunction(Param pm, UNUSED(int exp)). C:static void unsetpmfunction(Param pm, UNUSED(int exp))— remove the named function fromshfunctab. - unsetpmnameddir
- Port of
unsetpmnameddir()fromSrc/Modules/parameter.c:1534— C declunsetpmnameddir(Param pm, UNUSED(int exp)). C:static void unsetpmnameddir(Param pm, UNUSED(int exp))— remove the named directory fromnameddirtab. - unsetpmoption
- Port of
unsetpmoption()fromSrc/Modules/parameter.c:941— C declunsetpmoption(Param pm, UNUSED(int exp)). - unsetpmsalias
- Port of
unsetpmsalias()fromSrc/Modules/parameter.c:1759— C declunsetpmsalias(Param pm, UNUSED(int exp)). C:static void unsetpmsalias(Param pm, UNUSED(int exp))— remove the named suffix alias fromsufaliastab.
Type Aliases§
- Array
GetFn - PM_ARRAY entries from
Src/Modules/parameter.c:2239-2291— single whole-array getfn returningVec<String>(no per-key dispatch). Mirrors C’sgsu_array.getfn(pm) -> char**. - Array
SetFn - Whole-array setter. Mirrors C’s
gsu_array.setfn(pm, x). Only the writable special arrays (dirstack) have one; read-only specials leave itNone. - Hash
GetFn - Function-pointer types matching C’s
GetNodeFunc/ScanTabFuncfor the magic-assoc table dispatch. - Hash
Scan Fn HashScanFntype alias.