On this page:
config-file->hash

4.6 Configuration Parsing🔗ℹ

The zuo/config module is reprovided by zuo.

procedure

(config-file->hash file [overrides])  hash?

  file : path-string?
  overrides : hash? = (hash)
Parses file as having configuration lines of the form name = value, with any number of ignored spaces at the start of the line, end of the line, or around the =, and with a trailing \ on a line deleted along with its newline (to create a single line). A # character terminates a line to start a comment, unless the # is preceded by \, in which case the \# combination is parsed as a literal #.

Each name consists of alphanumeric characters and _; the symbol form of the name is used as a key in the resulting hash table, mapped to the value as a string. Lines in file that do not match the configuration format are ignored. If a same name is configured multiple times, the last mapping overrides earlier ones.

After reading file, keys from overrides are merged to the result hash table, where values in overrides replace ones read from file.