diff options
| author | a-kenji <aks.kenji@protonmail.com> | 2021-03-17 16:56:02 +0100 |
|---|---|---|
| committer | a-kenji <aks.kenji@protonmail.com> | 2021-03-17 16:56:02 +0100 |
| commit | e64192b42e584663ac6a64a73cff1921f098d945 (patch) | |
| tree | a25e629b1f168550ebf801d224348e9b94364582 /src/cli.rs | |
| parent | Remove logging to log.txt (diff) | |
| download | sl0ppij-e64192b42e584663ac6a64a73cff1921f098d945.tar.gz sl0ppij-e64192b42e584663ac6a64a73cff1921f098d945.tar.xz sl0ppij-e64192b42e584663ac6a64a73cff1921f098d945.zip | |
Add a clean config option
Add a clean config option, which
makes zellij not look for a default
configuration file.
Diffstat (limited to 'src/cli.rs')
| -rw-r--r-- | src/cli.rs | 18 |
1 files changed, 14 insertions, 4 deletions
@@ -1,7 +1,7 @@ use std::path::PathBuf; use structopt::StructOpt; -#[derive(StructOpt, Debug, Default)] +#[derive(StructOpt, Debug)] #[structopt(name = "zellij")] pub struct CliArgs { /// Send "split (direction h == horizontal / v == vertical)" to active zellij session @@ -24,10 +24,20 @@ pub struct CliArgs { #[structopt(short, long)] pub layout: Option<PathBuf>, - /// Path to the configuration yaml file - #[structopt(short, long)] - pub config: Option<PathBuf>, + #[structopt(subcommand)] + pub config: Option<ConfigCli>, #[structopt(short, long)] pub debug: bool, } + +#[derive(Debug, StructOpt)] +pub enum ConfigCli { + /// Path to the configuration yaml file + Config { + path: Option<PathBuf>, + #[structopt(long)] + /// Disables loading of configuration file at default location + clean: bool, + }, +} |
