clap-rs/clap 5886
A full featured, fast Command Line Argument Parser for Rust
FFI bindings for FFmpeg inner libraries.
A Rust crate that exposes FFmpeg's power as much as possible.
Actix web is a small, pragmatic, and extremely fast rust web framework.
ldm0/bat 0
A cat(1) clone with wings.
Implementing the type system described in the paper "Complete and Easy Bidirectional Type Inference" in Rust
:bike: A preprocessor for anyone writing specifications that converts source files into actual specs.
A macro to generate structures which behave like bitflags
Bloaty McBloatface: a size profiler for binaries
Personal blog generator
Pull request review commentclap-rs/clap
imp(validator): Case-insensitive required_if_eq when arg is case-insensitive
impl<'help> Arg<'help> { /// // We did use --other=special so "cfg" had become required but was missing. /// assert!(res.is_err()); /// assert_eq!(res.unwrap_err().kind, ErrorKind::MissingRequiredArgument);+ ///+ /// let res = App::new("prog")+ /// .arg(Arg::new("cfg")+ /// .takes_value(true)+ /// .required_if_eq("other", "special")+ /// .long("config"))+ /// .arg(Arg::new("other")+ /// .long("other")+ /// .takes_value(true))+ /// .try_get_matches_from(vec![+ /// "prog", "--other", "SPECIAL"+ /// ]);+ ///+ /// // By default, the comparison is case-sensitive, so "cfg" wasn't required+ /// assert!(res.is_ok());+ ///+ /// let res = App::new("prog")+ /// .arg(Arg::new("cfg")+ /// .takes_value(true)+ /// .required_if_eq("other", "special")+ /// .long("config"))+ /// .arg(Arg::new("other")+ /// .long("other")+ /// .case_insensitive(true)+ /// .takes_value(true))+ /// .try_get_matches_from(vec![+ /// "prog", "--other", "SPECIAL"+ /// ]);+ ///+ /// // However, case-insensitive comparisons can be enabled. This typically occurs when using Arg::possible_values().+ /// assert!(res.is_err());+ /// assert_eq!(res.unwrap_err().kind, ErrorKind::MissingRequiredArgument);
Good point, and that was my intention so that they would all the equality comparisons would have consistent behavior. I've added the interaction to the documentation for Arg::case_insensitive, and rebased to master to address the linting error.
comment created time in 6 hours
startedkpcyrd/libredefender
started time in 7 hours
fork jplatte/self_cell
Safe-to-use proc-macro-free self-referential structs in stable Rust.
fork in 12 hours
startedBYR-Navi/BYR-Navi
started time in 12 hours
startedBYR-Navi/BYR-Navi
started time in 12 hours
startedtuna/tunasync
started time in 12 hours
startedfuhsjr00/bug.n
started time in 13 hours
startednvim-telescope/telescope.nvim
started time in 13 hours
startedzhengqingya/xiao-xiao-su
started time in 19 hours
startedAkihiroSuda/lima
started time in 19 hours
startedmaharmstone/btrfs
started time in 19 hours
startedfuhsjr00/bug.n
started time in 21 hours
startedholmgr/cargo-sweep
started time in a day
startedmicrosoft/PowerToys
started time in a day
startedlarksuite/rsmpeg
started time in 2 days
startedmakenotion/notion-sdk-js
started time in 2 days
issue commentclap-rs/clap
@CreepySkeleton I've been playing around with the code and I think we could get it to work to support dynamic completion of a simple flag value. I haven't looked at the shell completion logic but I am thinking in the direction of only calling your_app --autocomplete 7 ... if we are at a flag position with automatic expansion.
It would be super cool, to reduce all shell autocomplete logic to calling out to your prog with the --autocomplete argument but that would probably require a different parser or a lot more work.
Anyways, if we use the --autocomplete "API", we can step by step expand it to cover more use cases.
comment created time in 2 days
push eventclap-rs/clap
commit sha e89f1e6c4d08141319a6cdb5bfedda7cdeec53b7
Input.insert: No need to clone
commit sha a4b9bfc97b0c8e688f8e5745326684192c2e6e6d
Merge pull request #2481 from kolloch/feature/no-clone-in-insert Input.insert: No need to clone
push time in 2 days
PR merged clap-rs/clap
Just a drive-by mini-improvement.
If you can't be bothered, I understand. Just close it.
pr closed time in 2 days
startedWizmann/ACM-ICPC
started time in 2 days
PR opened clap-rs/clap
Just a drive-by mini-improvement.
If you can't be bothered, I understand. Just close it.
pr created time in 2 days
PR opened clap-rs/clap
Implemented as AppSetting::Ignore errors as suggested by @CreepySkeleton in https://github.com/clap-rs/clap/issues/1880#issuecomment-637779787.
This is not a complete implementation but it works already in surprisingly many situations.
https://github.com/clap-rs/clap/issues/1880
pr created time in 2 days
startedgoogle/zx
started time in 2 days
issue openedclap-rs/clap
clap_generate an incorrect autocomplete zsh script
Please complete the following tasks
- [X] I have searched the discussions
- [X] I have searched the existing issues
Rust Version
rustc 1.53.0-nightly
Clap Version
master
Minimal reproducible code
Hi, I tried to generate on my little project https://github.com/mothsART/pouf autocompletion on zsh.
Cargo build produce this file : https://github.com/mothsART/pouf/blob/8335f28d5ea9c6a3916a3d5098481e3aaab9f45d/_pouf
and I included with :
source _pouf
This produce an error like :
_arguments:comparguments:312: can only be called from completion function
If i manualy delete _pouf "$@", everything seems correct.
Same issue with 2 opposite version of Zsh : Zsh 5.1 and 5.8 (the last one).
Finally, the script suggest me
compdef _pouf pouf
but it doesn't work. I replace it with :
compdef _pouf pouf
Steps to reproduce the bug with the above code
cargo build
Actual Behaviour
https://github.com/mothsART/pouf/blob/8335f28d5ea9c6a3916a3d5098481e3aaab9f45d/_pouf
Expected Behaviour
https://github.com/mothsART/pouf/blob/7e464e21f0a46795c83026511980f7c18de27dbb/_pouf
Additional Context
No response
Debug Output
No response
created time in 2 days
开发者边车,github打不开,github加速,git clone加速,git release下载加速,stackoverflow加速
fork in 3 days
starteddocmirror/dev-sidecar
started time in 3 days