Add a ta config set subcommand

This uses `toml_edit` to edit the config file in-place.  For the moment,
it only supports top-level arguments, but can be extended to do other
things later.
This commit is contained in:
Dustin J. Mitchell
2021-05-05 14:18:17 -04:00
parent a778423cbc
commit fd62c8327b
9 changed files with 261 additions and 6 deletions

View File

@@ -35,6 +35,10 @@ pub(crate) fn invoke(command: Command, settings: Settings) -> anyhow::Result<()>
subcommand: Subcommand::Help { summary },
command_name,
} => return cmd::help::execute(&mut w, command_name, summary),
Command {
subcommand: Subcommand::Config { config_operation },
..
} => return cmd::config::execute(&mut w, config_operation, &settings),
Command {
subcommand: Subcommand::Version,
..
@@ -90,6 +94,10 @@ pub(crate) fn invoke(command: Command, settings: Settings) -> anyhow::Result<()>
subcommand: Subcommand::Help { .. },
..
} => unreachable!(),
Command {
subcommand: Subcommand::Config { .. },
..
} => unreachable!(),
Command {
subcommand: Subcommand::Version,
..