Skip to content

D89 — Terminal options screen and options file

Decision

Route options can be chosen on a terminal screen (tracemaker tui) and kept in an options file (route --config FILE, name = value lines; the command line wins). The screen lists the options from the command-line definitions themselves; its choices and a file's lines are turned into arguments and parsed again like typed ones. Plain termios and ANSI sequences, no new dependency (issue #18)

Alternatives

A hand-written list of options for the screen; ncurses or FTXUI; CLI11's own config-file support; applying a file's values directly to the option variables

Reason

A second list would fall behind the sixty-odd options; reading the definitions cannot. One screen of rows, a filter and a prompt does not need a UI library, and a dependency would have to exist in CI and on macOS. CLI11 (2.5) did not read a config file given to a subcommand: the file was ignored without a message. Re-parsing gives a file's values the same checks and conversions as typed ones and makes "the command line wins" a matter of leaving out what was typed (doc 02 §2.1)