aboutsummaryrefslogtreecommitdiff
path: root/alacritty/src
diff options
context:
space:
mode:
authorKirill Chibisov <contact@kchibisov.com>2023-05-16 08:57:39 +0300
committerKirill Chibisov <contact@kchibisov.com>2023-05-17 08:36:41 +0300
commit6f6ad2b2eec9dbc9b3a1b0190d4a2dfd3c0b3bf6 (patch)
tree7bf2ac2542e2c4c601fc085d021e44601d8260b0 /alacritty/src
parent04811c674ba01a0f68d9842c33816b78fe3253ab (diff)
downloadr-alacritty-6f6ad2b2eec9dbc9b3a1b0190d4a2dfd3c0b3bf6.tar.gz
r-alacritty-6f6ad2b2eec9dbc9b3a1b0190d4a2dfd3c0b3bf6.tar.bz2
r-alacritty-6f6ad2b2eec9dbc9b3a1b0190d4a2dfd3c0b3bf6.zip
Update clap to v4.2.7
Fixes #6879. Fixes #6874.
Diffstat (limited to 'alacritty/src')
-rw-r--r--alacritty/src/cli.rs16
1 files changed, 8 insertions, 8 deletions
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"),