aboutsummaryrefslogtreecommitdiffstats
path: root/src/cli.rs
diff options
context:
space:
mode:
authora-kenji <aks.kenji@protonmail.com>2021-03-17 16:56:02 +0100
committera-kenji <aks.kenji@protonmail.com>2021-03-17 16:56:02 +0100
commite64192b42e584663ac6a64a73cff1921f098d945 (patch)
treea25e629b1f168550ebf801d224348e9b94364582 /src/cli.rs
parentRemove logging to log.txt (diff)
downloadsl0ppij-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.rs18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/cli.rs b/src/cli.rs
index 67a92196..740879f0 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -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,
+ },
+}