Expand description
The option registry: every config key in one table, with its type, default, the line that documents it, and the flag that sets it for one run, if one does.
What reads a setting is generated from or checked against this table: the -c KEY=VALUE parser, datui config keys, the commented file datui config init
writes, docs/reference/settings.md, and the flags’ help. Adding an option is
adding an entry here and the field it fills in datui-lib’s config structs; a test
there fails until the two agree.
Structs§
- EnvVar
- One environment variable datui reads.
- Open
Option - An option of one open, with no config key: it says how to read one file (#289), so it is a flag, a Python keyword and, for delimited text, a spec key.
- Override
- One
-c KEY=VALUE: a key the registry knows and its value, read for the key’s kind. - Section
- A config section: its title in the generated config and the reference.
- Setting
- One config key.
Enums§
- Default
Value - A setting’s default, as TOML.
- EnvGroup
- Who an environment variable belongs to, as the reference groups them.
- Kind
- What a setting’s value is. It decides how
-creads the text after=, and what the reference says the key takes.
Constants§
- ENVIRONMENT
- The environment variables datui reads, for the reference and the manpage.
- OPEN
- The open’s own options that Python takes as keywords, beside the config keys’.
- SECTIONS
- The sections, in the order the generated config and the reference list them.
- SETTINGS
- Every config key.
- TYPES
- How a value of each type is written, as Markdown: the settings reference and datui-config(5).
Functions§
- by_flag
- The setting a flag sets, if one does.
- by_
kwarg - The setting a Python keyword sets, if one does.
- find
- The setting
keynames, if any. - flag_
help - A flag’s help: its setting’s doc and key. Panics on a flag no setting names, which
--helpand the tests reach. - in_
section - The settings of
section, in table order. - parse_
bool true,falseand the words people use for them.- parse_
value textas the value ofsetting. Text needs no quotes, as withgit -c.- render_
environment_ markdown docs/reference/environment.md: every variable inENVIRONMENT, by group.- render_
settings_ markdown docs/reference/settings.md: every key by section, from this table. Written bygen_docs settings; a test fails while the committed page differs.- suggestions
- Keys close to
key: a few edits away, or a name in another section that one of them holds (comment_charandcomment, so a renamed key finds its new name).