You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A new optional variables {} config section defines NAME = value pairs that
menu/form authors reference as $NAME / ${NAME} to cut duplication. Values
may reference each other; cross-references are resolved once at config load
(a few fixpoint passes; undefined names left verbatim). In menu/form
actions and field list_cmd commands, expand_vars() substitutes the defined
names before the command runs (at the choke points exec_command /
call_system / run_browse / the final exec); any other $... (e.g. $HOME)
is left for the shell.
CCFE-side substitution, not env export -- so a value may contain shell
metacharacters and nothing clobbers PATH/HOME. The variables are as trusted
as the menus/forms; under restricted mode config is system-locked and the
allow-list still checks the command as written (a bare $VAR program name is
refused unless allow-listed). Documented in ccfe.conf(5).
Demo for testing: ccfe.conf ships a variables {} block (DEMO_NAME,
DEMO_HELLO referencing it, LIST_DIR=/etc) and a new demo menu entry
"Config variables demo" (demo.d/vars.form) whose list_cmd lists $LIST_DIR
and whose action greets via $DEMO_HELLO.
Covered by t/34 (cross-ref in a run: action, $HOME shell pass-through,
a variable in a list_cmd). Full suite green (378); ccfe.pl tidy+critic
gates pass.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments