Page MenuHomeFreeBSD

ls: `-v` flag
ClosedPublic

Authored by obiwac_gmail.com on Aug 31 2022, 7:48 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 8, 9:52 AM
Unknown Object (File)
Mon, Apr 8, 1:47 AM
Unknown Object (File)
Mon, Apr 8, 12:37 AM
Unknown Object (File)
Mar 11 2024, 4:31 PM
Unknown Object (File)
Mar 11 2024, 4:31 PM
Unknown Object (File)
Mar 11 2024, 4:31 PM
Unknown Object (File)
Mar 11 2024, 4:31 PM
Unknown Object (File)
Mar 11 2024, 4:31 PM
Subscribers

Details

Summary

Add a -v flag for ls(1) which sorts entries following a natural ordering using strverscmp(3) (e.g. "bloem1 bloem9 bloem10" as opposed to "bloem1 bloem10 bloem9").

Update manual page for ls(1).

Add test for ls -v.

Test Plan

Tested through the tests I wrote.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ls: Add strcoll(3) & strverscmp(3) to "SEE ALSO" in manpage

bin/ls/ls.1
893

I forgot a comma here when reordering.

One more comment about the manpage. Did you run "mandoc -Tlint" over it?

bin/ls/ls.1
407

This needs a line break after the sentence stop.

I have not, I didn't know about that, thanks for pointing me to it! I'll fix that in a bit. May I fix all the "STYLE: useless macro: Tn" errors or do I ignore those?

I have not, I didn't know about that, thanks for pointing me to it! I'll fix that in a bit. May I fix all the "STYLE: useless macro: Tn" errors or do I ignore those?

I suggest you do this in a separate commit to not bloat this one too much.
That way, we can separate individual changes easier and the review time in also reduced as people can focus on a single change.

ls: Remove Tn macros from manpage

Manpage looks good now. Thank you!

Both fixable on commit.

bin/ls/ls.1
35

Bump on commit.

403
This revision is now accepted and ready to land.Oct 12 2022, 5:32 PM
This revision was automatically updated to reflect the committed changes.