Page MenuHomeFreeBSD

ls(1): Allow LSCOLORS to specify an underline
ClosedPublic

Authored by me_cameronkatri.com on May 29 2021, 6:23 PM.

Details

Summary

Allows capitalizing the background color character to unable an underline instead of bold, capitalizing the foreground color char will still do bold.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

me_cameronkatri.com created this revision.

Like in another differential, I'm making a style-related note from a quick glance just to subscribe to this review. But I want to test this more thoroughly.

bin/ls/print.c
698–704

style(9) is not clear on this, but I believe that by our convention, objects of type other than bool are tested using operators (I mean, for example, pointers compared to NULL, chars compared to '\0' and so on).

pstef added inline comments.
bin/ls/print.c
705

} else {

This revision is now accepted and ready to land.Aug 24 2021, 6:23 PM
This revision now requires review to proceed.Aug 24 2021, 6:28 PM
This revision is now accepted and ready to land.Aug 24 2021, 6:32 PM
bin/ls/print.c
109

Wouldn't bool here be better as a type?

bin/ls/print.c
109

I used int to follow what was used for bold, but I can change them to be bool if you'd prefer.

bin/ls/print.c
109

I think such a slight inconsistency with the rest of the code would be less bad than using ints for boolean values.

This revision now requires review to proceed.Sep 18 2021, 12:24 PM

I just noticed that when I use git arc it changed the the repository to the subversion one instead of the git. I looks like the /usr/src/.arcconfig is still set to the subversion repo.

This revision was not accepted when it landed; it landed in state Needs Review.Sep 19 2021, 11:54 AM
This revision was automatically updated to reflect the committed changes.