diff options
author | a-kenji <aks.kenji@protonmail.com> | 2021-11-10 13:31:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-10 13:31:37 +0100 |
commit | abbe3b237af1308a6108d513c75b41ad0a889e3a (patch) | |
tree | 6c114a5b5e1ebc5de8fbebb6b77e91bad3862f9d /zellij-utils/src/cli.rs | |
parent | 4a3e8689ded45c0494a3e406c3801e7bc2e6aca0 (diff) |
add(feature): toggle boolean options with cli flag (#855)
add the ability to toggle boolean options with a cli flag:
example:
if the pane frames are turned off in the config file,
then passing in the `--no-pane-frames` flag will toggle the
pane frames on
Diffstat (limited to 'zellij-utils/src/cli.rs')
-rw-r--r-- | zellij-utils/src/cli.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/zellij-utils/src/cli.rs b/zellij-utils/src/cli.rs index 78615d929..2c1aeba37 100644 --- a/zellij-utils/src/cli.rs +++ b/zellij-utils/src/cli.rs @@ -1,6 +1,8 @@ -use crate::consts::{ZELLIJ_CONFIG_DIR_ENV, ZELLIJ_CONFIG_FILE_ENV}; -use crate::input::options::Options; use crate::setup::Setup; +use crate::{ + consts::{ZELLIJ_CONFIG_DIR_ENV, ZELLIJ_CONFIG_FILE_ENV}, + input::options::CliOptions, +}; use serde::{Deserialize, Serialize}; use std::path::PathBuf; use structopt::StructOpt; @@ -51,7 +53,7 @@ pub struct CliArgs { pub enum Command { /// Change the behaviour of zellij #[structopt(name = "options")] - Options(Options), + Options(CliOptions), /// Setup zellij and check its configuration #[structopt(name = "setup")] @@ -66,7 +68,7 @@ pub enum Command { pub enum SessionCommand { /// Change the behaviour of zellij #[structopt(name = "options")] - Options(Options), + Options(CliOptions), } #[derive(Debug, StructOpt, Clone, Serialize, Deserialize)] |