Skip to main content

Module parameter

Module parameter 

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

PartabArrayEntry
Strongly-typed entry for PM_ARRAY-shape magic-assocs.
PartabHashEntry
Strongly-typed PARTAB entry. C’s paramdef keeps 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 pardef from Src/Modules/parameter.c:2179. The per-magic-assoc parameter spec table — one entry per ${parameters}/${commands}/${functions}/etc. exposed by the zsh/parameter module.

Statics§

DIRSTACK
DIRSTACK static.
FUNCSTACK
FUNCSTACK static.
INCLEANUP
INCLEANUP static.
PARTAB
static const struct paramdef partab[] from Src/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 separate PARTAB_ARRAY once the array-shaped getfn types land.
PARTAB_ARRAY
static const struct paramdef partab[] PM_ARRAY subset from Src/Modules/parameter.c:2239-2291. Each entry’s gsu_array.getfn returns the full array (no per-key dispatch).

Functions§

assignaliasdefs
Port of assignaliasdefs() from Src/Modules/parameter.c:1867 — C decl assignaliasdefs(Param pm, int flags). C signature: static void assignaliasdefs(Param pm, int flags). C body sets pm->node.flags = PM_SCALAR (c:1869) then dispatches pm->gsu.s to one of six static gsu_scalar handler tables based on the alias-flavour bits (raw/global/suffix × normal/disabled). The gsu_scalar struct IS ported at zsh_h.rs:802 (with GsuScalar = 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 three pmdis*alias_gsu variants — that can’t be const-initialised in Rust because gsu_scalar holds Option<GsuFn> function pointers. Until the six per-flavour statics land as LazyLock<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_() from Src/Modules/parameter.c:2341 — C decl boot_(UNUSED(Module m)).
cleanup_
Port of cleanup_() from Src/Modules/parameter.c:2348 — C decl cleanup_(Module m). C body c:2350-2354 — wrap setfeatureenables(NULL) with incleanup=1/0 matching the same guard enables_ uses.
dirsgetfn
Port of dirsgetfn() from Src/Modules/parameter.c:1147 — C decl dirsgetfn(UNUSED(Param pm)). C: static char **dirsgetfn(UNUSED(Param pm)) → return hlinklist2array(dirstack, 1);
dirssetfn
Port of dirssetfn() from Src/Modules/parameter.c:1131 — C decl dirssetfn(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() from Src/Modules/parameter.c:917 — C decl dispatcharsgetfn(UNUSED(Param pm)). C: static char **dispatcharsgetfn(UNUSED(Param pm)) → return getpatchars(1);
disreswordsgetfn
Port of disreswordsgetfn() from Src/Modules/parameter.c:885 — C decl disreswordsgetfn(UNUSED(Param pm)). C: static char **disreswordsgetfn(UNUSED(Param pm)) → return getreswords(DISABLED);
enables_
Port of enables_() from Src/Modules/parameter.c:2326 — C decl enables_(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_() from Src/Modules/parameter.c:2318 — C decl features_(Module m, char ***features).
finish_
Port of finish_() from Src/Modules/parameter.c:2359 — C decl finish_(UNUSED(Module m)).
funcfiletracegetfn
Port of funcfiletracegetfn() from Src/Modules/parameter.c:711 — C decl funcfiletracegetfn(UNUSED(Param pm)). Walks funcstack building 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() from Src/Modules/parameter.c:679 — C decl static char **funcsourcetracegetfn(UNUSED(Param pm)). Same shape as functracegetfn but uses f->filename / f->flineno (the source location, not the caller location).
funcstackgetfn
Port of funcstackgetfn() from Src/Modules/parameter.c:627 — C decl funcstackgetfn(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() from Src/Modules/parameter.c:648 — C decl static char **functracegetfn(UNUSED(Param pm)). Walks the funcstack linked list, building "<caller>:<lineno>" per frame.
getalias
Port of getalias() from Src/Modules/parameter.c:1901 — C decl getalias(HashTable alht, UNUSED(HashTable ht), const char *name, int flags). C body (c:1906-1919):
getbuiltin
Port of getbuiltin() from Src/Modules/parameter.c:775 — C decl getbuiltin(UNUSED(HashTable ht), const char *name, int dis). C body (c:778-796):
getfunction
Port of getfunction() from Src/Modules/parameter.c:389 — C decl getfunction(UNUSED(HashTable ht), const char *name, int dis). C body (c:392-441):
getfunction_source
Port of getfunction_source() from Src/Modules/parameter.c:537 — C decl getfunction_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() from Src/Modules/parameter.c:799 — C decl getpmbuiltin(HashTable ht, const char *name). C: static HashNode getpmbuiltin(HashTable ht, const char *name) → return getbuiltin(ht, name, 0);
getpmcommand
Port of getpmcommand() from Src/Modules/parameter.c:213 — C decl getpmcommand(UNUSED(HashTable ht), const char *name). C body (c:216-241):
getpmdisbuiltin
Port of getpmdisbuiltin() from Src/Modules/parameter.c:806 — C decl getpmdisbuiltin(HashTable ht, const char *name). C: static HashNode getpmdisbuiltin(HashTable ht, const char *name) → return getbuiltin(ht, name, DISABLED);
getpmdisfunction
Port of getpmdisfunction() from Src/Modules/parameter.c:451 — C decl getpmdisfunction(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() from Src/Modules/parameter.c:600 — C decl getpmdisfunction_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() from Src/Modules/parameter.c:1944 — C decl getpmdisgalias(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() from Src/Modules/parameter.c:1930 — C decl getpmdisralias(HashTable ht, const char *name). C: static HashNode getpmdisralias(HashTable ht, const char *name) → return getalias(aliastab, ht, name, DISABLED);
getpmdissalias
Port of getpmdissalias() from Src/Modules/parameter.c:1958 — C decl getpmdissalias(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() from Src/Modules/parameter.c:444 — C decl getpmfunction(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() from Src/Modules/parameter.c:591 — C decl getpmfunction_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() from Src/Modules/parameter.c:1937 — C decl getpmgalias(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() from Src/Modules/parameter.c:1156 — C decl getpmhistory(UNUSED(HashTable ht), const char *name). C body (c:1159-1206): quietgetn(name) → histnum; getHistEnt(num) → histent; emit pm.u.str = histent->text.
getpmjobdir
Port of getpmjobdir() from Src/Modules/parameter.c:1457 — C decl getpmjobdir(UNUSED(HashTable ht), const char *name).
getpmjobstate
Port of getpmjobstate() from Src/Modules/parameter.c:1385 — C decl getpmjobstate(UNUSED(HashTable ht), const char *name).
getpmjobtext
Port of getpmjobtext() from Src/Modules/parameter.c:1277 — C decl getpmjobtext(UNUSED(HashTable ht), const char *name).
getpmmodule
Port of getpmmodule() from Src/Modules/parameter.c:1040 — C decl getpmmodule(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() from Src/Modules/parameter.c:1597 — C decl getpmnameddir(UNUSED(HashTable ht), const char *name). C body (c:1600-1615):
getpmoption
Port of getpmoption() from Src/Modules/parameter.c:988 — C decl getpmoption(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() from Src/Modules/parameter.c:99 — C decl getpmparameter(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() from Src/Modules/parameter.c:1923 — C decl getpmralias(HashTable ht, const char *name). C: static HashNode getpmralias(HashTable ht, const char *name) → return getalias(aliastab, ht, name, 0);
getpmsalias
Port of getpmsalias() from Src/Modules/parameter.c:1951 — C decl getpmsalias(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() from Src/Modules/parameter.c:1646 — C decl getpmuserdir(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() from Src/Modules/parameter.c:2102 — C decl getpmusergroups(UNUSED(HashTable ht), const char *name). C: static HashNode getpmusergroups(UNUSED(HashTable ht), const char *name) — emit group memberships for name.
histwgetfn
Port of histwgetfn() from Src/Modules/parameter.c:1217 — C decl static char **histwgetfn(UNUSED(Param pm)). The $historywords array getter. C body c:1224-1226 prepends bufferwords(NULL, NULL, NULL, 0) (current editor line) to the result, then walks the history ring newest→oldest slicing each entry’s words via the histent.words[] (begin,end) byte-offset pairs in reverse position order.
paramtypestr
Port of paramtypestr() from Src/Modules/parameter.c:43 — C decl paramtypestr(Param pm). C: static char *paramtypestr(Param pm) — render a parameter’s type and modifier flags as the typeset -p flag string.
patcharsgetfn
Port of patcharsgetfn() from Src/Modules/parameter.c:911 — C decl patcharsgetfn(UNUSED(Param pm)). C: static char **patcharsgetfn(UNUSED(Param pm)) → return getpatchars(0);
pmjobdir
Port of pmjobdir() from Src/Modules/parameter.c:1447 — C decl pmjobdir(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() from Src/Modules/parameter.c:1340 — C decl pmjobstate(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() from Src/Modules/parameter.c:1255 — C decl pmjobtext(Job jtab, int job). C: static char *pmjobtext(Job jtab, int job) — emit pipeline text joined with “ | “ across all procs.
reswordsgetfn
Port of reswordsgetfn() from Src/Modules/parameter.c:878 — C decl reswordsgetfn(UNUSED(Param pm)). C: static char **reswordsgetfn(UNUSED(Param pm)) → return getreswords(0);
scanaliases
Port of scanaliases() from Src/Modules/parameter.c:1965 — C decl scanaliases(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() from Src/Modules/parameter.c:813 — C decl scanbuiltins(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() from Src/Modules/parameter.c:458 — C decl scanfunctions(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() from Src/Modules/parameter.c:560 — C decl scanfunctions_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() from Src/Modules/parameter.c:843 — C decl scanpmbuiltins(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() from Src/Modules/parameter.c:245 — C decl scanpmcommands(UNUSED(HashTable ht), ScanFunc func, int flags). C body (c:248-280):
scanpmdisbuiltins
Port of scanpmdisbuiltins() from Src/Modules/parameter.c:850 — C decl scanpmdisbuiltins(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() from Src/Modules/parameter.c:618 — C decl scanpmdisfunction_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() from Src/Modules/parameter.c:526 — C decl scanpmdisfunctions(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() from Src/Modules/parameter.c:2011 — C decl scanpmdisgaliases(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() from Src/Modules/parameter.c:1997 — C decl scanpmdisraliases(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() from Src/Modules/parameter.c:2025 — C decl scanpmdissaliases(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() from Src/Modules/parameter.c:609 — C decl scanpmfunction_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() from Src/Modules/parameter.c:519 — C decl scanpmfunctions(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() from Src/Modules/parameter.c:2004 — C decl scanpmgaliases(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() from Src/Modules/parameter.c:1188 — C decl scanpmhistory(UNUSED(HashTable ht), ScanFunc func, int flags).
scanpmjobdirs
Port of scanpmjobdirs() from Src/Modules/parameter.c:1487 — C decl scanpmjobdirs(UNUSED(HashTable ht), ScanFunc func, int flags).
scanpmjobstates
Port of scanpmjobstates() from Src/Modules/parameter.c:1415 — C decl scanpmjobstates(UNUSED(HashTable ht), ScanFunc func, int flags).
scanpmjobtexts
Port of scanpmjobtexts() from Src/Modules/parameter.c:1308 — C decl scanpmjobtexts(UNUSED(HashTable ht), ScanFunc func, int flags).
scanpmmodules
Port of scanpmmodules() from Src/Modules/parameter.c:1074 — C decl scanpmmodules(UNUSED(HashTable ht), ScanFunc func, int flags).
scanpmnameddirs
Port of scanpmnameddirs() from Src/Modules/parameter.c:1618 — C decl scanpmnameddirs(UNUSED(HashTable ht), ScanFunc func, int flags). C body (c:1621-1641):
scanpmoptions
Port of scanpmoptions() from Src/Modules/parameter.c:1016 — C decl scanpmoptions(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() from Src/Modules/parameter.c:124 — C decl scanpmparameters(UNUSED(HashTable ht), ScanFunc func, int flags).
scanpmraliases
Port of scanpmraliases() from Src/Modules/parameter.c:1990 — C decl scanpmraliases(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() from Src/Modules/parameter.c:2018 — C decl scanpmsaliases(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() from Src/Modules/parameter.c:1669 — C decl scanpmuserdirs(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() from Src/Modules/parameter.c:2143 — C decl scanpmusergroups(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() from Src/Modules/parameter.c:1699 — C decl setalias(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() from Src/Modules/parameter.c:1769 — C decl static void setaliases(HashTable alht, Param pm, HashTable ht, int flags). Implements the “replace every alias of the given flag-class with the entries of ht” semantics that drive $raliases=(...), $dis_raliases=(...), $galiases=(...), $dis_galiases=(...) assignment.
setfunction
Port of setfunction() from Src/Modules/parameter.c:284 — C decl setfunction(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() from Src/Modules/parameter.c:344 — C decl setfunctions(Param pm, HashTable ht, int dis). C: static void setfunctions(Param pm, HashTable ht, int dis) — install all functions in ht. 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() from Src/Modules/parameter.c:151 — C decl setpmcommand(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() from Src/Modules/parameter.c:173 — C decl setpmcommands(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 by arrhashsetfn (Src/params.c:4113) whose nodes are child Params carrying values in u.str; zshrs’s hashnode has no value slot, so the (key, value) pairs are passed directly. The iteration semantics are identical: one install per pair, additive (existing cmdnamtab entries are NOT flushed).
setpmdisfunction
Port of setpmdisfunction() from Src/Modules/parameter.c:327 — C decl setpmdisfunction(Param pm, char *value). C: setfunction(pm->node.nam, value, DISABLED);
setpmdisfunctions
Port of setpmdisfunctions() from Src/Modules/parameter.c:377 — C decl setpmdisfunctions(Param pm, HashTable ht). C: setfunctions(pm, ht, DISABLED);
setpmdisgalias
Port of setpmdisgalias() from Src/Modules/parameter.c:1728 — C decl setpmdisgalias(Param pm, char *value). C: setalias(aliastab, pm, value, ALIAS_GLOBAL|DISABLED);
setpmdisgaliases
Port of setpmdisgaliases() from Src/Modules/parameter.c:1833 — C decl setpmdisgaliases(Param pm, HashTable ht). C: setaliases(aliastab, pm, ht, ALIAS_GLOBAL|DISABLED);
setpmdisralias
Port of setpmdisralias() from Src/Modules/parameter.c:1714 — C decl setpmdisralias(Param pm, char *value). C: setalias(aliastab, pm, value, DISABLED);
setpmdisraliases
Port of setpmdisraliases() from Src/Modules/parameter.c:1819 — C decl setpmdisraliases(Param pm, HashTable ht).
setpmdissalias
Port of setpmdissalias() from Src/Modules/parameter.c:1742 — C decl setpmdissalias(Param pm, char *value).
setpmdissaliases
Port of setpmdissaliases() from Src/Modules/parameter.c:1847 — C decl setpmdissaliases(Param pm, HashTable ht).
setpmfunction
Port of setpmfunction() from Src/Modules/parameter.c:320 — C decl setpmfunction(Param pm, char *value). C: setfunction(pm->node.nam, value, 0);
setpmfunctions
Port of setpmfunctions() from Src/Modules/parameter.c:370 — C decl setpmfunctions(Param pm, HashTable ht).
setpmgalias
Port of setpmgalias() from Src/Modules/parameter.c:1721 — C decl setpmgalias(Param pm, char *value).
setpmgaliases
Port of setpmgaliases() from Src/Modules/parameter.c:1826 — C decl setpmgaliases(Param pm, HashTable ht).
setpmnameddir
Port of setpmnameddir() from Src/Modules/parameter.c:1519 — C decl setpmnameddir(Param pm, char *value). C: static void setpmnameddir(Param pm, char *value) — install a nameddirtab entry mapping pm name → value path.
setpmnameddirs
Port of setpmnameddirs() from Src/Modules/parameter.c:1544 — C decl setpmnameddirs(Param pm, HashTable ht). C: static void setpmnameddirs(Param pm, HashTable ht) — replace nameddirtab (preserving ND_USERNAME entries) with ht’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() from Src/Modules/parameter.c:926 — C decl setpmoption(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() from Src/Modules/parameter.c:953 — C decl setpmoptions(Param pm, HashTable ht). C: static void setpmoptions(Param pm, HashTable ht) — set or unset each shell option named in ht based 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() from Src/Modules/parameter.c:1707 — C decl setpmralias(Param pm, char *value).
setpmraliases
Port of setpmraliases() from Src/Modules/parameter.c:1812 — C decl setpmraliases(Param pm, HashTable ht).
setpmsalias
Port of setpmsalias() from Src/Modules/parameter.c:1735 — C decl setpmsalias(Param pm, char *value).
setpmsaliases
Port of setpmsaliases() from Src/Modules/parameter.c:1840 — C decl setpmsaliases(Param pm, HashTable ht).
setup_
Port of setup_() from Src/Modules/parameter.c:2311 — C decl setup_(UNUSED(Module m)).
unsetpmalias
Port of unsetpmalias() from Src/Modules/parameter.c:1749 — C decl unsetpmalias(Param pm, UNUSED(int exp)). C: static void unsetpmalias(Param pm, UNUSED(int exp)) — remove the named alias from aliastab.
unsetpmcommand
Port of unsetpmcommand() from Src/Modules/parameter.c:163 — C decl unsetpmcommand(Param pm, UNUSED(int exp)). C: static void unsetpmcommand(Param pm, UNUSED(int exp)) — remove the named entry from cmdnamtab.
unsetpmfunction
Port of unsetpmfunction() from Src/Modules/parameter.c:334 — C decl unsetpmfunction(Param pm, UNUSED(int exp)). C: static void unsetpmfunction(Param pm, UNUSED(int exp)) — remove the named function from shfunctab.
unsetpmnameddir
Port of unsetpmnameddir() from Src/Modules/parameter.c:1534 — C decl unsetpmnameddir(Param pm, UNUSED(int exp)). C: static void unsetpmnameddir(Param pm, UNUSED(int exp)) — remove the named directory from nameddirtab.
unsetpmoption
Port of unsetpmoption() from Src/Modules/parameter.c:941 — C decl unsetpmoption(Param pm, UNUSED(int exp)).
unsetpmsalias
Port of unsetpmsalias() from Src/Modules/parameter.c:1759 — C decl unsetpmsalias(Param pm, UNUSED(int exp)). C: static void unsetpmsalias(Param pm, UNUSED(int exp)) — remove the named suffix alias from sufaliastab.

Type Aliases§

ArrayGetFn
PM_ARRAY entries from Src/Modules/parameter.c:2239-2291 — single whole-array getfn returning Vec<String> (no per-key dispatch). Mirrors C’s gsu_array.getfn(pm) -> char**.
ArraySetFn
Whole-array setter. Mirrors C’s gsu_array.setfn(pm, x). Only the writable special arrays (dirstack) have one; read-only specials leave it None.
HashGetFn
Function-pointer types matching C’s GetNodeFunc / ScanTabFunc for the magic-assoc table dispatch.
HashScanFn
HashScanFn type alias.