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.
Paths
| Differential D36407 Authored by obiwac_gmail.com on Aug 31 2022, 7:48 PM.
Tags None Referenced Files
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
Event TimelineHerald added a subscriber: imp. · View Herald TranscriptAug 31 2022, 7:48 PM2022-08-31 19:48:11 (UTC+0) Harbormaster completed remote builds in B47208: Diff 110023.Aug 31 2022, 7:48 PM2022-08-31 19:48:43 (UTC+0) obiwac_gmail.com updated this revision to Diff 110024.Aug 31 2022, 7:51 PM2022-08-31 19:51:50 (UTC+0) Comment Actionsls: Add strcoll(3) & strverscmp(3) to "SEE ALSO" in manpage Harbormaster completed remote builds in B47209: Diff 110024.Aug 31 2022, 7:52 PM2022-08-31 19:52:03 (UTC+0)
obiwac_gmail.com updated this revision to Diff 110040.Edited · Sep 1 2022, 11:33 AM2022-09-01 11:33:42 (UTC+0) Comment ActionsFix commas in ls.1 Harbormaster completed remote builds in B47217: Diff 110040.Sep 1 2022, 11:33 AM2022-09-01 11:33:46 (UTC+0) Comment Actions One more comment about the manpage. Did you run "mandoc -Tlint" over it?
Comment Actions 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? Comment Actions
I suggest you do this in a separate commit to not bloat this one too much. obiwac_gmail.com updated this revision to Diff 110352.Sep 8 2022, 11:48 AM2022-09-08 11:48:18 (UTC+0) Comment ActionsFix warnings from mandoc -Tlint Harbormaster completed remote builds in B47293: Diff 110352.Sep 8 2022, 11:48 AM2022-09-08 11:48:22 (UTC+0) obiwac_gmail.com edited the summary of this revision. (Show Details)Sep 8 2022, 11:48 AM2022-09-08 11:48:48 (UTC+0) obiwac_gmail.com updated this revision to Diff 110356.Sep 8 2022, 3:31 PM2022-09-08 15:31:32 (UTC+0) Comment Actionsls: Remove Tn macros from manpage Harbormaster completed remote builds in B47294: Diff 110356.Sep 8 2022, 3:31 PM2022-09-08 15:31:36 (UTC+0) This revision is now accepted and ready to land.Oct 12 2022, 5:32 PM2022-10-12 17:32:38 (UTC+0) Closed by commit rGe2662256cdbc: ls(1): add a -v flag to sort naturally (authored by obiwac_gmail.com, committed by pstef). · Explain WhyOct 30 2022, 11:14 PM2022-10-30 23:14:00 (UTC+0) This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 110352 bin/ls/cmp.c
bin/ls/extern.h
bin/ls/ls.1
bin/ls/ls.c
bin/ls/tests/ls_tests.sh
|
style(9) doesn't allow both <sys/types.h> and <sys/param.h> included at the same time.