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

ls --dired: adjust our code after GNU v9.5 #6144

Merged
merged 4 commits into from
Jun 24, 2024
Merged

Conversation

sylvestre
Copy link
Contributor

@sylvestre sylvestre commented Mar 29, 2024

regressed because of #6139

Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/ls/dired is no longer failing!

@cakebaker
Copy link
Contributor

Did you see that test_ls_dired_hyperlink_disabled fails on Windows?

Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/ls/dired is no longer failing!

src/uu/ls/src/ls.rs Outdated Show resolved Hide resolved
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/tail/inotify-dir-recreate (fails in this run but passes in the 'main' branch)
Congrats! The gnu test tests/ls/dired is no longer failing!

@sylvestre sylvestre requested a review from BenWiederhake March 31, 2024 10:09
Copy link
Collaborator

@BenWiederhake BenWiederhake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implements and tests exactly what's on the tin. Awesome!

Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/ls/dired is no longer failing!
Skipping an intermittent issue tests/tail/inotify-dir-recreate (passes in this run but fails in the 'main' branch)

Copy link
Member

@tertsdiepraam tertsdiepraam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a bit of a clap issue again here, I believe (but I don't have 9.5 installed yet so I can't check, I'll verify soon). The problem is that we are forcing the long format after all arguments have been processed by clap, whereas even the new GNU version, does it as soon as --dired is encountered. Hence, we'll probably be incompatible in this case:

ls --dired --format=vertical

Because GNU still overrides it but we don't. Not necessarity a super big problem, but something to be aware of. And please do correct me if I'm interpreting this wrong.

src/uu/ls/src/ls.rs Outdated Show resolved Hide resolved
tests/by-util/test_ls.rs Outdated Show resolved Hide resolved
tests/by-util/test_ls.rs Outdated Show resolved Hide resolved
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/ls/dired is no longer failing!
Congrats! The gnu test tests/timeout/timeout is no longer failing!

Manages cases like:
$ ls -R --dired --hyperlink a2
will show hyperlink
$ ls -R --hyperlink --dired a2
won't
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/ls/dired is no longer failing!
Congrats! The gnu test tests/timeout/timeout is no longer failing!

Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/tail/inotify-dir-recreate (fails in this run but passes in the 'main' branch)
Congrats! The gnu test tests/ls/dired is no longer failing!
Congrats! The gnu test tests/tr/tr is no longer failing!

tests/by-util/test_ls.rs Outdated Show resolved Hide resolved
src/uu/ls/src/ls.rs Outdated Show resolved Hide resolved
src/uu/ls/src/ls.rs Outdated Show resolved Hide resolved
Closes: uutils#6488

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/tail/inotify-dir-recreate (fails in this run but passes in the 'main' branch)
Congrats! The gnu test tests/ls/dired is no longer failing!

@sylvestre sylvestre force-pushed the dired branch 2 times, most recently from f007727 to 572485c Compare June 23, 2024 20:23
@sylvestre
Copy link
Contributor Author

I tried with https://docs.rs/clap/latest/clap/struct.ArgMatches.html#method.index_of but it doesn't work with the setTrue

Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/ls/dired is no longer failing!

src/uu/ls/src/dired.rs Outdated Show resolved Hide resolved
…want to see the

long format

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/ls/dired is no longer failing!

1 similar comment
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/ls/dired is no longer failing!

@cakebaker cakebaker merged commit 92c3de5 into uutils:main Jun 24, 2024
65 of 68 checks passed
@cakebaker
Copy link
Contributor

Congrats! The gnu test tests/ls/dired is no longer failing!

Great, good job :)

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.

4 participants