aboutsummaryrefslogtreecommitdiff
path: root/alacritty
diff options
context:
space:
mode:
Diffstat (limited to 'alacritty')
-rw-r--r--alacritty/Cargo.toml4
-rw-r--r--alacritty/src/cli.rs16
2 files changed, 10 insertions, 10 deletions
diff --git a/alacritty/Cargo.toml b/alacritty/Cargo.toml
index 40b64c6f..3999dd9f 100644
--- a/alacritty/Cargo.toml
+++ b/alacritty/Cargo.toml
@@ -24,7 +24,7 @@ version = "0.1.2-dev"
[dependencies]
bitflags = "2.2.1"
-clap = { version = "3.0.0", features = ["derive", "env"] }
+clap = { version = "4.2.7", features = ["derive", "env"] }
copypasta = { version = "0.8.1", default-features = false }
crossfont = { version = "0.5.0", features = ["force_system_fontconfig"] }
fnv = "1"
@@ -46,7 +46,7 @@ winit = { version = "0.28.2", default-features = false, features = ["serde"] }
gl_generator = "0.14.0"
[dev-dependencies]
-clap_complete = "3.0.0"
+clap_complete = "4.2.3"
[target.'cfg(not(windows))'.dependencies]
xdg = "2.5.0"
diff --git a/alacritty/src/cli.rs b/alacritty/src/cli.rs
index 38707036..7f39e527 100644
--- a/alacritty/src/cli.rs
+++ b/alacritty/src/cli.rs
@@ -4,7 +4,7 @@ use std::path::PathBuf;
#[cfg(unix)]
use clap::Subcommand;
-use clap::{Args, Parser, ValueHint};
+use clap::{ArgAction, Args, Parser, ValueHint};
use log::{self, error, LevelFilter};
use serde::{Deserialize, Serialize};
use serde_yaml::Value;
@@ -51,15 +51,15 @@ pub struct Options {
pub socket: Option<PathBuf>,
/// Reduces the level of verbosity (the min level is -qq).
- #[clap(short, conflicts_with("verbose"), parse(from_occurrences))]
+ #[clap(short, conflicts_with("verbose"), action = ArgAction::Count)]
quiet: u8,
/// Increases the level of verbosity (the max level is -vvv).
- #[clap(short, conflicts_with("quiet"), parse(from_occurrences))]
+ #[clap(short, conflicts_with("quiet"), action = ArgAction::Count)]
verbose: u8,
/// Override configuration file options [example: cursor.style=Beam].
- #[clap(short = 'o', long, multiple_values = true)]
+ #[clap(short = 'o', long, num_args = 1..)]
option: Vec<String>,
/// CLI options for config overrides.
@@ -195,7 +195,7 @@ pub struct TerminalOptions {
pub hold: bool,
/// Command and args to execute (must be last argument).
- #[clap(short = 'e', long, allow_hyphen_values = true, multiple_values = true)]
+ #[clap(short = 'e', long, allow_hyphen_values = true, num_args = 1..)]
command: Vec<String>,
}
@@ -242,7 +242,7 @@ pub struct WindowIdentity {
pub title: Option<String>,
/// Defines window class/app_id on X11/Wayland [default: Alacritty].
- #[clap(long, value_name = "general> | <general>,<instance", parse(try_from_str = parse_class))]
+ #[clap(long, value_name = "general> | <general>,<instance", value_parser = parse_class)]
pub class: Option<Class>,
}
@@ -330,7 +330,7 @@ mod tests {
use std::io::Read;
#[cfg(target_os = "linux")]
- use clap::IntoApp;
+ use clap::CommandFactory;
#[cfg(target_os = "linux")]
use clap_complete::Shell;
use serde_yaml::mapping::Mapping;
@@ -446,7 +446,7 @@ mod tests {
#[cfg(target_os = "linux")]
#[test]
fn completions() {
- let mut clap = Options::into_app();
+ let mut clap = Options::command();
for (shell, file) in &[
(Shell::Bash, "alacritty.bash"),