diff options
| author | denis <denismaximov98@gmail.com> | 2021-05-01 13:45:01 +0300 |
|---|---|---|
| committer | denis <denismaximov98@gmail.com> | 2021-05-01 13:45:01 +0300 |
| commit | eabecde90b1617ce4c29be9d5af3f52ccb67e45f (patch) | |
| tree | 0d0dafa594269045f084383a9719f2a4995fe7ea /src/cli.rs | |
| parent | wip: more cleaning up (diff) | |
| parent | docs(changelog): performance improvements (diff) | |
| download | sl0ppij-eabecde90b1617ce4c29be9d5af3f52ccb67e45f.tar.gz sl0ppij-eabecde90b1617ce4c29be9d5af3f52ccb67e45f.tar.xz sl0ppij-eabecde90b1617ce4c29be9d5af3f52ccb67e45f.zip | |
chore: painless merge this time
Diffstat (limited to 'src/cli.rs')
| -rw-r--r-- | src/cli.rs | 23 |
1 files changed, 18 insertions, 5 deletions
@@ -1,9 +1,7 @@ +use super::common::utils::consts::{ZELLIJ_CONFIG_DIR_ENV, ZELLIJ_CONFIG_FILE_ENV}; use std::path::PathBuf; use structopt::StructOpt; -// TODO add to consts.rs -const ZELLIJ_CONFIG_ENV: &str = "ZELLIJ_CONFIG"; - #[derive(StructOpt, Default, Debug)] #[structopt(name = "zellij")] pub struct CliArgs { @@ -32,9 +30,13 @@ pub struct CliArgs { pub layout: Option<PathBuf>, /// Change where zellij looks for the configuration - #[structopt(short, long, env=ZELLIJ_CONFIG_ENV)] + #[structopt(short, long, env=ZELLIJ_CONFIG_FILE_ENV)] pub config: Option<PathBuf>, + /// Change where zellij looks for the configuration + #[structopt(long, env=ZELLIJ_CONFIG_DIR_ENV)] + pub config_dir: Option<PathBuf>, + #[structopt(subcommand)] pub option: Option<ConfigCli>, @@ -47,8 +49,19 @@ pub enum ConfigCli { /// Change the behaviour of zellij #[structopt(name = "option")] Config { - #[structopt(long)] /// Disables loading of configuration file at default location + #[structopt(long)] clean: bool, }, + + #[structopt(name = "generate-completion")] + GenerateCompletion { shell: String }, + + #[structopt(name = "setup")] + Setup { + /// Disables loading of configuration file at default location + /// Dump the default configuration file to stdout + #[structopt(long)] + dump_config: bool, + }, } |
