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

Switch arg parsing to clap v4 with derive #818

Merged
merged 1 commit into from
Mar 16, 2023
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
199 changes: 161 additions & 38 deletions Cargo.lock

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

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ name = "lsd"
path = "src/main.rs"

[build-dependencies]
clap = "3.2.17"
clap_complete = "3.2.4"
clap = { version = "4.1", features = ["derive"] }
clap_complete = "4.1"
version_check = "0.9.*"

[dependencies]
Expand Down Expand Up @@ -50,8 +50,8 @@ xattr = "0.2.*"
windows = { version = "0.43.0", features = ["Win32_Foundation", "Win32_Security_Authorization", "Win32_Storage_FileSystem", "Win32_System_Memory"] }

[dependencies.clap]
features = ["suggestions", "color", "wrap_help"]
version = "3.2.17"
features = ["derive", "wrap_help"]
version = "4.1"

[dev-dependencies]
assert_cmd = "1"
Expand Down
6 changes: 2 additions & 4 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
// notice may not be copied, modified, or distributed except
// according to those terms.

extern crate clap;
extern crate version_check;

use clap::CommandFactory;
use clap_complete::generate_to;
use clap_complete::shells::*;
use std::fs;
Expand All @@ -29,7 +27,7 @@ fn main() {

fs::create_dir_all(&outdir).unwrap();

let mut app = build();
let mut app = Cli::command();
let bin_name = "lsd";
generate_to(Bash, &mut app, bin_name, &outdir).expect("Failed to generate Bash completions");
generate_to(Fish, &mut app, bin_name, &outdir).expect("Failed to generate Fish completions");
Expand Down
Loading