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
- Direct port of
assignaliasdefs(Param pm, int flags)from Src/Modules/parameter.c:1867. 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_(UNUSED(Module m))fromSrc/Modules/parameter.c:2341. - cleanup_
- Port of
cleanup_(UNUSED(Module m))fromSrc/Modules/parameter.c:2348. C body c:2350-2354 — wrap setfeatureenables(NULL) with incleanup=1/0 matching the same guard enables_ uses. - dirsgetfn
- Port of
dirsgetfn(UNUSED(Param pm))from Src/Modules/parameter.c:1147. C:static char **dirsgetfn(UNUSED(Param pm))→return hlinklist2array(dirstack, 1); - dirssetfn
- Port of
dirssetfn(UNUSED(Param pm), char **x)from Src/Modules/parameter.c:1131. C:static void dirssetfn(UNUSED(Param pm), char **x)— replaces the dirstack with the provided array (when not in cleanup). - dispatcharsgetfn
- Port of
dispatcharsgetfn(UNUSED(Param pm))from Src/Modules/parameter.c:917. C:static char **dispatcharsgetfn(UNUSED(Param pm))→return getpatchars(1); - disreswordsgetfn
- Port of
disreswordsgetfn(UNUSED(Param pm))from Src/Modules/parameter.c:885. C:static char **disreswordsgetfn(UNUSED(Param pm))→return getreswords(DISABLED); - enables_
- Port of
enables_(UNUSED(Module m), UNUSED(int **enables))fromSrc/Modules/parameter.c:2326. 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_(UNUSED(Module m), UNUSED(char ***features))fromSrc/Modules/parameter.c:2318. - finish_
- Port of
finish_(UNUSED(Module m))fromSrc/Modules/parameter.c:2359. - funcfiletracegetfn
- Port of
funcfiletracegetfn(UNUSED(Param pm))from Src/Modules/parameter.c:711. 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
static char **funcsourcetracegetfn(UNUSED(Param pm))fromSrc/Modules/parameter.c:679. Same shape asfunctracegetfnbut usesf->filename/f->flineno(the source location, not the caller location). - funcstackgetfn
- Port of
funcstackgetfn(UNUSED(Param pm))from Src/Modules/parameter.c:627. C:static char **funcstackgetfn(UNUSED(Param pm))— returns the list of function names currently on the call stack. - functracegetfn
- Port of
functracegetfn(UNUSED(Param pm))from Src/Modules/parameter.c:648. C:static char **functracegetfn(UNUSED(Param pm))— Port ofstatic char **functracegetfn(UNUSED(Param pm))fromSrc/Modules/parameter.c:648. Walks thefuncstacklinked list, building"<caller>:<lineno>"per frame. - getalias
- Direct port of
getalias(HashTable alht, UNUSED(HashTable ht), const char *name, int flags)from Src/Modules/parameter.c:1900. C body (c:1906-1919): - getbuiltin
- Direct port of
getbuiltin(UNUSED(HashTable ht), const char *name, int dis)from Src/Modules/parameter.c:775. C body (c:778-796): - getfunction
- Direct port of
getfunction(UNUSED(HashTable ht), const char *name, int dis)from Src/Modules/parameter.c:389. C body (c:392-441): - getfunction_
source - Port of
getfunction_source(UNUSED(HashTable ht), const char *name, int dis)from Src/Modules/parameter.c:537. 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(HashTable ht, const char *name)from Src/Modules/parameter.c:799. C:static HashNode getpmbuiltin(HashTable ht, const char *name)→return getbuiltin(ht, name, 0); - getpmcommand
- Direct port of
getpmcommand(UNUSED(HashTable ht), const char *name)from Src/Modules/parameter.c:213. C body (c:216-241): - getpmdisbuiltin
- Port of
getpmdisbuiltin(HashTable ht, const char *name)from Src/Modules/parameter.c:806. C:static HashNode getpmdisbuiltin(HashTable ht, const char *name)→return getbuiltin(ht, name, DISABLED); - getpmdisfunction
- Port of
getpmdisfunction(HashTable ht, const char *name)from Src/Modules/parameter.c:451. C:static HashNode getpmdisfunction(HashTable ht, const char *name)→return getfunction(ht, name, DISABLED); - getpmdisfunction_
source - Port of
getpmdisfunction_source(HashTable ht, const char *name)from Src/Modules/parameter.c:600. 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(HashTable ht, const char *name)from Src/Modules/parameter.c:1944. C:static HashNode getpmdisgalias(HashTable ht, const char *name)→return getalias(aliastab, ht, name, ALIAS_GLOBAL|DISABLED); - getpmdisralias
- Port of
getpmdisralias(HashTable ht, const char *name)from Src/Modules/parameter.c:1930. C:static HashNode getpmdisralias(HashTable ht, const char *name)→return getalias(aliastab, ht, name, DISABLED); - getpmdissalias
- Port of
getpmdissalias(HashTable ht, const char *name)from Src/Modules/parameter.c:1958. C:static HashNode getpmdissalias(HashTable ht, const char *name)→return getalias(sufaliastab, ht, name, ALIAS_SUFFIX|DISABLED); - getpmfunction
- Port of
getpmfunction(HashTable ht, const char *name)from Src/Modules/parameter.c:444. C:static HashNode getpmfunction(HashTable ht, const char *name)→return getfunction(ht, name, 0); - getpmfunction_
source - Port of
getpmfunction_source(HashTable ht, const char *name)from Src/Modules/parameter.c:591. C:static HashNode getpmfunction_source(HashTable ht, const char *name)→return getfunction_source(ht, name, 0); - getpmgalias
- Port of
getpmgalias(HashTable ht, const char *name)from Src/Modules/parameter.c:1937. C:static HashNode getpmgalias(HashTable ht, const char *name)→return getalias(aliastab, ht, name, ALIAS_GLOBAL); - getpmhistory
- Direct port of
getpmhistory(UNUSED(HashTable ht), const char *name)from Src/Modules/parameter.c:1156. C body (c:1159-1206): quietgetn(name) → histnum; getHistEnt(num) → histent; emitpm.u.str = histent->text. - getpmjobdir
- Port of
getpmjobdir(UNUSED(HashTable ht), const char *name)from Src/Modules/parameter.c:1457. Port ofgetpmjobdir(UNUSED(HashTable ht), const char *name)from Src/Modules/parameter.c:1457. - getpmjobstate
- Port of
getpmjobstate(UNUSED(HashTable ht), const char *name)from Src/Modules/parameter.c:1385. Same Port ofgetpmjobstate(UNUSED(HashTable ht), const char *name)from Src/Modules/parameter.c:1385. - getpmjobtext
- Port of
getpmjobtext(UNUSED(HashTable ht), const char *name)from Src/Modules/parameter.c:1277. - getpmmodule
- Port of
getpmmodule(UNUSED(HashTable ht), const char *name)from Src/Modules/parameter.c:1040. Static-link path returns an empty PM_SPECIAL Param — modules are statically linked in zshrs (no runtime module table). - getpmnameddir
- Direct port of
getpmnameddir(UNUSED(HashTable ht), const char *name)from Src/Modules/parameter.c:1597. C body (c:1600-1615): - getpmoption
- Port of
getpmoption(UNUSED(HashTable ht), const char *name)from Src/Modules/parameter.c:988. C:static HashNode getpmoption(UNUSED(HashTable ht), const char *name)— emit “on”/“off” for the named shell option. - getpmparameter
- Direct port of
getpmparameter(UNUSED(HashTable ht), const char *name)from Src/Modules/parameter.c:99. 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(HashTable ht, const char *name)from Src/Modules/parameter.c:1923. C:static HashNode getpmralias(HashTable ht, const char *name)→return getalias(aliastab, ht, name, 0); - getpmsalias
- Port of
getpmsalias(HashTable ht, const char *name)from Src/Modules/parameter.c:1951. C:static HashNode getpmsalias(HashTable ht, const char *name)→return getalias(sufaliastab, ht, name, ALIAS_SUFFIX); - getpmuserdir
- Port of
getpmuserdir(UNUSED(HashTable ht), const char *name)from Src/Modules/parameter.c:1646. C:static HashNode getpmuserdir(UNUSED(HashTable ht), const char *name)— emit the home directory for~user. - getpmusergroups
- Port of
getpmusergroups(UNUSED(HashTable ht), const char *name)from Src/Modules/parameter.c:2102. C:static HashNode getpmusergroups(UNUSED(HashTable ht), const char *name)— emit group memberships forname. - histwgetfn
- Direct port of
static char **histwgetfn(UNUSED(Param pm))fromSrc/Modules/parameter.c:1217. 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(Param pm)from Src/Modules/parameter.c:43. C:static char *paramtypestr(Param pm)— render a parameter’s type and modifier flags as thetypeset -pflag string. - patcharsgetfn
- Port of
patcharsgetfn(UNUSED(Param pm))from Src/Modules/parameter.c:911. C:static char **patcharsgetfn(UNUSED(Param pm))→return getpatchars(0); - pmjobdir
- Port of
pmjobdir(Job jtab, int job)from Src/Modules/parameter.c:1447. C:static char *pmjobdir(Job jtab, int job)→return dupstring(jtab[job].pwd ? jtab[job].pwd : pwd); - pmjobstate
- Port of
pmjobstate(Job jtab, int job)from Src/Modules/parameter.c:1340. 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(Job jtab, int job)from Src/Modules/parameter.c:1255. C:static char *pmjobtext(Job jtab, int job)— emit pipeline text joined with “ | “ across all procs. - reswordsgetfn
- Port of
reswordsgetfn(UNUSED(Param pm))from Src/Modules/parameter.c:878. C:static char **reswordsgetfn(UNUSED(Param pm))→return getreswords(0); - scanaliases
- Port of
scanaliases(HashTable alht, UNUSED(HashTable ht), ScanFunc func, int pmflags, int alflags)from Src/Modules/parameter.c:1965. 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(UNUSED(HashTable ht), ScanFunc func, int flags, int dis)from Src/Modules/parameter.c:813. 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(UNUSED(HashTable ht), ScanFunc func, int flags, int dis)from Src/Modules/parameter.c:458. 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(UNUSED(HashTable ht), ScanFunc func, int flags, int dis)from Src/Modules/parameter.c:560. 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(HashTable ht, ScanFunc func, int flags)from Src/Modules/parameter.c:843. 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
- Direct port of
scanpmcommands(UNUSED(HashTable ht), ScanFunc func, int flags)from Src/Modules/parameter.c:245. C body (c:248-280): - scanpmdisbuiltins
- Port of
scanpmdisbuiltins(HashTable ht, ScanFunc func, int flags)from Src/Modules/parameter.c:850. 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(HashTable ht, ScanFunc func, int flags)from Src/Modules/parameter.c:618. 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(HashTable ht, ScanFunc func, int flags)from Src/Modules/parameter.c:526. 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(HashTable ht, ScanFunc func, int flags)from Src/Modules/parameter.c:2011. WARNING: param names don’t match C — Rust=(ht, func) vs C=(ht, func, flags) - scanpmdisraliases
- Port of
scanpmdisraliases(HashTable ht, ScanFunc func, int flags)from Src/Modules/parameter.c:1997. WARNING: param names don’t match C — Rust=(ht, func) vs C=(ht, func, flags) - scanpmdissaliases
- Port of
scanpmdissaliases(HashTable ht, ScanFunc func, int flags)from Src/Modules/parameter.c:2025. WARNING: param names don’t match C — Rust=(ht, func) vs C=(ht, func, flags) - scanpmfunction_
source - Port of
scanpmfunction_source(HashTable ht, ScanFunc func, int flags)from Src/Modules/parameter.c:609. WARNING: param names don’t match C — Rust=(ht, func) vs C=(ht, func, flags) - scanpmfunctions
- Port of
scanpmfunctions(HashTable ht, ScanFunc func, int flags)from Src/Modules/parameter.c:519. WARNING: param names don’t match C — Rust=(ht, func) vs C=(ht, func, flags) - scanpmgaliases
- Port of
scanpmgaliases(HashTable ht, ScanFunc func, int flags)from Src/Modules/parameter.c:2004. WARNING: param names don’t match C — Rust=(ht, func) vs C=(ht, func, flags) - scanpmhistory
- Port of
scanpmhistory(UNUSED(HashTable ht), ScanFunc func, int flags)from Src/Modules/parameter.c:1188. - scanpmjobdirs
- Port of
scanpmjobdirs(UNUSED(HashTable ht), ScanFunc func, int flags)from Src/Modules/parameter.c:1487. - scanpmjobstates
- Port of
scanpmjobstates(UNUSED(HashTable ht), ScanFunc func, int flags)from Src/Modules/parameter.c:1415. - scanpmjobtexts
- Port of
scanpmjobtexts(UNUSED(HashTable ht), ScanFunc func, int flags)from Src/Modules/parameter.c:1308. - scanpmmodules
- Port of
scanpmmodules(UNUSED(HashTable ht), ScanFunc func, int flags)from Src/Modules/parameter.c:1074. - scanpmnameddirs
- Direct port of
scanpmnameddirs(UNUSED(HashTable ht), ScanFunc func, int flags)from Src/Modules/parameter.c:1618. C body (c:1621-1641): - scanpmoptions
- Direct port of
scanpmoptions(UNUSED(HashTable ht), ScanFunc func, int flags)from Src/Modules/parameter.c:1016. 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(UNUSED(HashTable ht), ScanFunc func, int flags)from Src/Modules/parameter.c:124. - scanpmraliases
- Port of
scanpmraliases(HashTable ht, ScanFunc func, int flags)from Src/Modules/parameter.c:1990. WARNING: param names don’t match C — Rust=(ht, func) vs C=(ht, func, flags) - scanpmsaliases
- Port of
scanpmsaliases(HashTable ht, ScanFunc func, int flags)from Src/Modules/parameter.c:2018. WARNING: param names don’t match C — Rust=(ht, func) vs C=(ht, func, flags) - scanpmuserdirs
- Direct port of
scanpmuserdirs(UNUSED(HashTable ht), ScanFunc func, int flags)from Src/Modules/parameter.c:1669. 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
- Direct port of
scanpmusergroups(UNUSED(HashTable ht), ScanFunc func, int flags)from Src/Modules/parameter.c:2143. 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(HashTable ht, Param pm, char *value, int flags)from Src/Modules/parameter.c:1699. 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(HashTable alht, Param pm, HashTable ht, int flags)from Src/Modules/parameter.c:1769. - setfunction
- Port of
setfunction(char *name, char *val, int dis)from Src/Modules/parameter.c:284. C:static void setfunction(char *name, char *val, int dis)— install a shell function from text source. - setfunctions
- Port of
setfunctions(Param pm, HashTable ht, int dis)from Src/Modules/parameter.c:344. 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(Param pm, char *value)from Src/Modules/parameter.c:151. C:static void setpmcommand(Param pm, char *value)— register a path alias in cmdnamtab for the named command. - setpmcommands
- Port of
setpmcommands(Param pm, HashTable ht)from Src/Modules/parameter.c:173. 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(Param pm, char *value)from Src/Modules/parameter.c:327. C:setfunction(pm->node.nam, value, DISABLED); - setpmdisfunctions
- Port of
setpmdisfunctions(Param pm, HashTable ht)from Src/Modules/parameter.c:377. C:setfunctions(pm, ht, DISABLED); - setpmdisgalias
- Port of
setpmdisgalias(Param pm, char *value)from Src/Modules/parameter.c:1728. C:setalias(aliastab, pm, value, ALIAS_GLOBAL|DISABLED); - setpmdisgaliases
- Port of
setpmdisgaliases(Param pm, HashTable ht)from Src/Modules/parameter.c:1833. C:setaliases(aliastab, pm, ht, ALIAS_GLOBAL|DISABLED); - setpmdisralias
- Port of
setpmdisralias(Param pm, char *value)from Src/Modules/parameter.c:1714. C:setalias(aliastab, pm, value, DISABLED); - setpmdisraliases
- Port of
setpmdisraliases(Param pm, HashTable ht)from Src/Modules/parameter.c:1819. - setpmdissalias
- Port of
setpmdissalias(Param pm, char *value)from Src/Modules/parameter.c:1742. - setpmdissaliases
- Port of
setpmdissaliases(Param pm, HashTable ht)from Src/Modules/parameter.c:1847. - setpmfunction
- Port of
setpmfunction(Param pm, char *value)from Src/Modules/parameter.c:320. C:setfunction(pm->node.nam, value, 0); - setpmfunctions
- Port of
setpmfunctions(Param pm, HashTable ht)from Src/Modules/parameter.c:370. - setpmgalias
- Port of
setpmgalias(Param pm, char *value)from Src/Modules/parameter.c:1721. - setpmgaliases
- Port of
setpmgaliases(Param pm, HashTable ht)from Src/Modules/parameter.c:1826. - setpmnameddir
- Port of
setpmnameddir(Param pm, char *value)from Src/Modules/parameter.c:1519. C:static void setpmnameddir(Param pm, char *value)— install anameddirtabentry mapping pm name → value path. - setpmnameddirs
- Port of
setpmnameddirs(Param pm, HashTable ht)from Src/Modules/parameter.c:1544. 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(Param pm, char *value)from Src/Modules/parameter.c:926. 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(Param pm, HashTable ht)from Src/Modules/parameter.c:953. 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(Param pm, char *value)from Src/Modules/parameter.c:1707. - setpmraliases
- Port of
setpmraliases(Param pm, HashTable ht)from Src/Modules/parameter.c:1812. - setpmsalias
- Port of
setpmsalias(Param pm, char *value)from Src/Modules/parameter.c:1735. - setpmsaliases
- Port of
setpmsaliases(Param pm, HashTable ht)from Src/Modules/parameter.c:1840. - setup_
- Port of
setup_(UNUSED(Module m))fromSrc/Modules/parameter.c:2311. - unsetpmalias
- Port of
unsetpmalias(Param pm, UNUSED(int exp))from Src/Modules/parameter.c:1749. C:static void unsetpmalias(Param pm, UNUSED(int exp))— remove the named alias fromaliastab. - unsetpmcommand
- Port of
unsetpmcommand(Param pm, UNUSED(int exp))from Src/Modules/parameter.c:163. C:static void unsetpmcommand(Param pm, UNUSED(int exp))— remove the named entry fromcmdnamtab. - unsetpmfunction
- Port of
unsetpmfunction(Param pm, UNUSED(int exp))from Src/Modules/parameter.c:334. C:static void unsetpmfunction(Param pm, UNUSED(int exp))— remove the named function fromshfunctab. - unsetpmnameddir
- Port of
unsetpmnameddir(Param pm, UNUSED(int exp))from Src/Modules/parameter.c:1534. C:static void unsetpmnameddir(Param pm, UNUSED(int exp))— remove the named directory fromnameddirtab. - unsetpmoption
- Port of
unsetpmoption(Param pm, UNUSED(int exp))from Src/Modules/parameter.c:941. - unsetpmsalias
- Port of
unsetpmsalias(Param pm, UNUSED(int exp))from Src/Modules/parameter.c:1759. 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.