Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update clap: 3.1.18 -> 3.2.2 #1496

Merged
merged 1 commit into from
Jun 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 58 additions & 42 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions zellij-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ license = "MIT"
anyhow = "1.0.45"
backtrace = "0.3.55"
bincode = "1.3.1"
clap = { version = "3.0", features = ["derive", "env"] }
clap_complete = "3.0"
clap = { version = "3.2.2", features = ["derive", "env"] }
clap_complete = "3.2.1"
colored = "2.0.0"
colorsys = "0.6.5"
crossbeam = "0.8.1"
Expand Down
28 changes: 15 additions & 13 deletions zellij-utils/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,49 +11,49 @@ use std::path::PathBuf;
#[clap(version, name = "zellij")]
pub struct CliArgs {
/// Maximum panes on screen, caution: opening more panes will close old ones
#[clap(long)]
#[clap(long, value_parser)]
pub max_panes: Option<usize>,

/// Change where zellij looks for plugins
#[clap(long, parse(from_os_str), overrides_with = "data_dir")]
#[clap(long, value_parser, overrides_with = "data_dir")]
pub data_dir: Option<PathBuf>,

/// Run server listening at the specified socket path
#[clap(long, parse(from_os_str), hide = true, overrides_with = "server")]
#[clap(long, value_parser, hide = true, overrides_with = "server")]
pub server: Option<PathBuf>,

/// Specify name of a new session
#[clap(long, short, overrides_with = "session")]
#[clap(long, short, overrides_with = "session", value_parser)]
pub session: Option<String>,

/// Name of a predefined layout inside the layout directory or the path to a layout file
#[clap(short, long, parse(from_os_str), overrides_with = "layout")]
#[clap(short, long, value_parser, overrides_with = "layout")]
pub layout: Option<PathBuf>,

/// Change where zellij looks for the configuration file
#[clap(short, long, overrides_with = "config", env = ZELLIJ_CONFIG_FILE_ENV, parse(from_os_str))]
#[clap(short, long, overrides_with = "config", env = ZELLIJ_CONFIG_FILE_ENV, value_parser)]
pub config: Option<PathBuf>,

/// Change where zellij looks for the configuration directory
#[clap(long, overrides_with = "config_dir", env = ZELLIJ_CONFIG_DIR_ENV, parse(from_os_str))]
#[clap(long, overrides_with = "config_dir", env = ZELLIJ_CONFIG_DIR_ENV, value_parser)]
pub config_dir: Option<PathBuf>,

#[clap(subcommand)]
pub command: Option<Command>,

/// Specify emitting additional debug information
#[clap(short, long)]
#[clap(short, long, value_parser)]
pub debug: bool,
}

#[derive(Debug, Subcommand, Clone, Serialize, Deserialize)]
pub enum Command {
/// Change the behaviour of zellij
#[clap(name = "options")]
#[clap(name = "options", value_parser)]
Options(CliOptions),

/// Setup zellij and check its configuration
#[clap(name = "setup")]
#[clap(name = "setup", value_parser)]
Setup(Setup),

/// Explore existing zellij sessions
Expand All @@ -78,14 +78,15 @@ pub enum Sessions {
#[clap(visible_alias = "a")]
Attach {
/// Name of the session to attach to.
#[clap(value_parser)]
session_name: Option<String>,

/// Create a session if one does not exist.
#[clap(short, long)]
#[clap(short, long, value_parser)]
create: bool,

/// Number of the session index in the active sessions ordered creation date.
#[clap(long)]
#[clap(long, value_parser)]
index: Option<usize>,

/// Change the behaviour of zellij
Expand All @@ -97,14 +98,15 @@ pub enum Sessions {
#[clap(visible_alias = "k")]
KillSession {
/// Name of target session
#[clap(value_parser)]
target_session: Option<String>,
},

/// Kill all sessions
#[clap(visible_alias = "ka")]
KillAllSessions {
/// Automatic yes to prompts
#[clap(short, long)]
#[clap(short, long, value_parser)]
yes: bool,
},
}
Loading