mirror of
https://github.com/zellij-org/zellij.git
synced 2024-11-26 22:15:19 +03:00
fix(config): allow POSIX style --config
override (#1205)
Allow multiple `--config` flags, then use the latter. Also allows similar behaviour for similar flags. fixes: #310
This commit is contained in:
parent
c8bc69fea4
commit
21f7b5baa5
@ -15,31 +15,31 @@ pub struct CliArgs {
|
|||||||
pub max_panes: Option<usize>,
|
pub max_panes: Option<usize>,
|
||||||
|
|
||||||
/// Change where zellij looks for layouts and plugins
|
/// Change where zellij looks for layouts and plugins
|
||||||
#[clap(long, parse(from_os_str))]
|
#[clap(long, parse(from_os_str), overrides_with = "data_dir")]
|
||||||
pub data_dir: Option<PathBuf>,
|
pub data_dir: Option<PathBuf>,
|
||||||
|
|
||||||
/// Run server listening at the specified socket path
|
/// Run server listening at the specified socket path
|
||||||
#[clap(long, parse(from_os_str), hide = true)]
|
#[clap(long, parse(from_os_str), hide = true, overrides_with = "server")]
|
||||||
pub server: Option<PathBuf>,
|
pub server: Option<PathBuf>,
|
||||||
|
|
||||||
/// Specify name of a new session
|
/// Specify name of a new session
|
||||||
#[clap(long, short)]
|
#[clap(long, short, overrides_with = "session")]
|
||||||
pub session: Option<String>,
|
pub session: Option<String>,
|
||||||
|
|
||||||
/// Name of a layout file in the layout directory
|
/// Name of a layout file in the layout directory
|
||||||
#[clap(short, long, parse(from_os_str))]
|
#[clap(short, long, parse(from_os_str), overrides_with = "layout")]
|
||||||
pub layout: Option<PathBuf>,
|
pub layout: Option<PathBuf>,
|
||||||
|
|
||||||
/// Path to a layout yaml file
|
/// Path to a layout yaml file
|
||||||
#[clap(long, parse(from_os_str))]
|
#[clap(long, parse(from_os_str), overrides_with = "layout_path")]
|
||||||
pub layout_path: Option<PathBuf>,
|
pub layout_path: Option<PathBuf>,
|
||||||
|
|
||||||
/// Change where zellij looks for the configuration file
|
/// Change where zellij looks for the configuration file
|
||||||
#[clap(short, long, env = ZELLIJ_CONFIG_FILE_ENV, parse(from_os_str))]
|
#[clap(short, long, overrides_with = "config", env = ZELLIJ_CONFIG_FILE_ENV, parse(from_os_str))]
|
||||||
pub config: Option<PathBuf>,
|
pub config: Option<PathBuf>,
|
||||||
|
|
||||||
/// Change where zellij looks for the configuration directory
|
/// Change where zellij looks for the configuration directory
|
||||||
#[clap(long, env = ZELLIJ_CONFIG_DIR_ENV, parse(from_os_str))]
|
#[clap(long, overrides_with = "config_dir", env = ZELLIJ_CONFIG_DIR_ENV, parse(from_os_str))]
|
||||||
pub config_dir: Option<PathBuf>,
|
pub config_dir: Option<PathBuf>,
|
||||||
|
|
||||||
#[clap(subcommand)]
|
#[clap(subcommand)]
|
||||||
|
Loading…
Reference in New Issue
Block a user