Skip to content

Conversation

@jhscheer
Copy link
Contributor

Clap v3.0.0-beta.2 was needed instead of the latest stable 2.33.3 in order to be able to use Arg::visible_short_alias.
Otherwise the use of multiple short flags for the same option would have required an ugly work around with an additional App::arg for every short flag alias.

Since all other ports use clap 2.33, I'm unsure if it's okay to use a non stable Clap?
There are other uutils that would benefit from Arg::visible_short_alias, e.g. rm -r / rm -R (#1834), etc.

@sylvestre
Copy link
Contributor

I would rather not rely on non stable version. Sorry
do we have an eta clap3 btw?

@jhscheer
Copy link
Contributor Author

Okay then 2.33.3 it is.
I also wonder about the ETA for Clap 3.0.

@ycd
Copy link
Contributor

ycd commented May 3, 2021

I think there is at least 6 months before Clap 3.0, see clap-rs/clap#1037

@jhscheer
Copy link
Contributor Author

jhscheer commented May 3, 2021

@sylvestre this is ready to review/merge

@sylvestre sylvestre merged commit 3f5dda6 into uutils:master May 4, 2021
@sylvestre
Copy link
Contributor

@jhscheer it is failing on travis
https://travis-ci.org/github/uutils/coreutils/jobs/769608125

---- test_who::test_lookup stdout ----

current_directory_resolved: 

run: /home/travis/build/uutils/coreutils/target/debug/coreutils who --lookup
current_directory_resolved: 
run: who --lookup
thread 'test_who::test_lookup' panicked at 'assertion failed: `(left == right)`
Diff < left / right > :
<"travis   pts/0        2021-05-05 21:03 (\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}10)\n"
>"travis   pts/0        2021-05-05 21:03 (10.16.5.10)\n"
', tests/common/util.rs:205:9

Could you please have a look? thanks

@sylvestre
Copy link
Contributor

@jhscheer opened: #2181

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

who: move from getopts to clap

3 participants