Skip to content

Commit

Permalink
feat: added clap shell completion and implemented Default trait on Args
Browse files Browse the repository at this point in the history
- added build.rs: cargo will generate shell completion for bash, zsh,
fish and elvish on source change
- implemented Default trait on Args: Now we can write tests without all
those unnecessary args by replacing them with ..Default::default()
  • Loading branch information
abhi-xyz committed Dec 26, 2024
1 parent 98b3951 commit 71639e4
Show file tree
Hide file tree
Showing 12 changed files with 263 additions and 97 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
/target

# Generated by `oranda generate ci`
public/
public/
rust-toolchain.toml
flake.nix
flake.lock
124 changes: 68 additions & 56 deletions Cargo.lock

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

6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ path = "src/main.rs"
[dependencies]
blake2 = "0.10.6"
clap = { version = "4.5.23", features = ["derive"] }
clap_complete = "4.5.40"
console = "0.15.8"
digest = "0.10.7"
eyre = "0.6.12"
Expand All @@ -33,6 +34,11 @@ tracing-subscriber = { version = "0.3.19", features = ["env-filter"] }
rand = "0.8.5"
tempfile = "3.14.0"

[build-dependencies]
clap = { version = "4.5.23", features = ["derive"] }
clap_complete = "4.5.40"
clap_complete_nushell = "4.5.4"

# The profile that 'dist' will build with
[profile.dist]
inherits = "release"
Expand Down
Loading

0 comments on commit 71639e4

Please sign in to comment.