From abbe3b237af1308a6108d513c75b41ad0a889e3a Mon Sep 17 00:00:00 2001 From: a-kenji Date: Wed, 10 Nov 2021 13:31:37 +0100 Subject: 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 --- zellij-utils/src/cli.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'zellij-utils/src/cli.rs') 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)] -- cgit v1.2.3