The library has supported profile-based configuration resolution (via the NOTMUCH_PROFILE environment variable) for some time, and all three library entry points already accept a profile parameter. This series exposes that functionality as a --profile=PROFILE CLI flag, making it consistent with --config (which overrides NOTMUCH_CONFIG).
The design follows the --config pattern: parsed once in main() before subcommand dispatch, rather than added to notmuch_shared_options. This keeps it from appearing in every subcommand's --help output and avoids redundant re-parsing. Since v1 ([email protected]): - renamed the profile variable from notmuch_requested_profile to profile_name, following config_file_name (review by David Bremner) - quoted shell variables in the new test helper functions (review by David Bremner and Tomi Ollila) - T035 count expectations are now derived from the corpus at test time rather than hard-coded; the previous hard-coded 52 was stale because the new subtests ran after subtests that add messages inwit (3): cli: add --profile option doc: document --profile option test: add tests for --profile CLI option doc/man1/notmuch.rst | 13 +++++++++--- notmuch.c | 21 +++++++++++++----- test/T035-read-config.sh | 46 ++++++++++++++++++++++++++++++++++++++++ test/T055-path-config.sh | 25 +++++++++++++++++++++- 4 files changed, 96 insertions(+), 9 deletions(-) -- 2.53.0 _______________________________________________ notmuch mailing list -- [email protected] To unsubscribe send an email to [email protected]
