ls: some improvements after #9431#10149
Merged
cakebaker merged 5 commits intouutils:mainfrom Jan 10, 2026
Merged
Conversation
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
cakebaker
reviewed
Jan 10, 2026
src/uu/ls/src/colors.rs
Outdated
Comment on lines
22
to
34
| #[cfg(unix)] | ||
| mod unix_mode_bits { | ||
| // Unix file mode bits | ||
| pub const MODE_SETUID: u32 = 0o4000; | ||
| pub const MODE_SETGID: u32 = 0o2000; | ||
| pub const MODE_EXECUTABLE: u32 = 0o0111; | ||
| pub const MODE_STICKY_OTHER_WRITABLE: u32 = 0o1002; | ||
| pub const MODE_OTHER_WRITABLE: u32 = 0o0002; | ||
| pub const MODE_STICKY: u32 = 0o1000; | ||
| } | ||
|
|
||
| #[cfg(unix)] | ||
| use unix_mode_bits::*; |
Contributor
There was a problem hiding this comment.
Here it might be an option to rename unix_mode_bits to just mode. It would allow you to get rid of the MODE prefix of the constants.
cakebaker
reviewed
Jan 10, 2026
src/uu/ls/src/colors.rs
Outdated
| return Some(Indicator::RegularFile); | ||
| fn indicator_for_symlink( | ||
| &self, | ||
| _path: &PathData, |
Contributor
There was a problem hiding this comment.
I would remove _path, it's never used.
3ba3dd8 to
f07f5b9
Compare
|
GNU testsuite comparison: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
follow up #9431