Open dontlaugh opened 1 year ago
Command line flags override configuration, so there isn't a merged configuration so to speak yet. We use the pattern of setting command line flag defaults from configuration. For instance: https://github.com/ugexe/zef/blob/710034fe3537826548d7f5c8983b3fb2db1e17de/lib/Zef/CLI.rakumod#L415 with the problem there being there is not yet a centralized mapping of environment variables to a single configuration object.
I'm looking into running Blin, and it relies on paring
--help
to find Zef's JSON config.https://github.com/Raku/Blin/blob/253df4c042a1fb8cd0fd92ccedf9ce3fb9bcca70/lib/Blin/Tester/Zef.rakumod#L26-L27
It's understandable that parsing is required, since the automatic config paths seem volatile. Here's mine, for instance
I propose a new subcommand namespace,
config
(or maybezef debug
could work), that simply evaluates/merges config sources, and prints them to stdout.Blin's use case could then be accomplished with something like
Prior art:
kubectl config view
,lxc config show
, and more.This is also an alternative to changing the bemavior of
--help
per #477