-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Silently accepts ---presume-input-tty #2532
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
Silently accepts ---presume-input-tty #2532
Conversation
For whatever reason, the following is equivalent, cargo run -- rm --presume-input-tty cargo run -- rm ---presume-input-tty cargo run -- rm -----presume-input-tty cargo run -- rm ---------presume-input-tty Signed-off-by: Hanif Bin Ariffin <hanif.ariffin.4326@gmail.com>
This is to override |
Could you please add a test to verify that the option isn't going to be rejected? |
…lently-accept-presume-input-tty
Signed-off-by: Hanif Bin Ariffin <hanif.ariffin.4326@gmail.com>
Running GNU testsuite:
Well done! |
Quick question since I'm running into this with the transition to clap 3 (#2863). In this PR, tests were added for |
IIRC, the only one that GNU supports is 3 hyphens, but there was an issue with clap before where it doesn't matter how many hyphens there are it will still accept them. If clap 3 fixe this issue, perhaps those tests should be removed. Anyhow, this feature isn't really necessary either, its just there to bypass some tests or something. |
Thanks! Clap indeed removed the arbitrary number of hyphens, so I'll move to only supporting 3 hyphens with clap 3 (although because of how long arguments work in clap I'll have to support both 2 and 3 hyphens) |
For whatever reason, the following is equivalent,
It seems that this is basically a noop in GNU as well. I haven't taken the time to go through the source code to know what it actually does.
And I can't even google anything on this (What secrets does it try to hide!?)
Closes #2345 (Will you look at that number)
Signed-off-by: Hanif Bin Ariffin hanif.ariffin.4326@gmail.com