Closed bbc2 closed 11 months ago
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: bbc2
The full list of commands accepted by this bot can be found here.
Merging #905 (5ffa319) into master (762e724) will decrease coverage by
0.69%
. The diff coverage is95.45%
.
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
@@ Coverage Diff @@
## master #905 +/- ##
==========================================
- Coverage 86.53% 85.84% -0.69%
==========================================
Files 49 50 +1
Lines 4848 4932 +84
==========================================
+ Hits 4195 4234 +39
- Misses 653 698 +45
Files Changed | Coverage Δ | |
---|---|---|
src/app.rs | 33.33% <ø> (ø) |
|
src/meta/owner.rs | 87.50% <93.75%> (+12.50%) |
:arrow_up: |
src/flags/truncate_owner.rs | 95.45% <95.45%> (ø) |
|
src/config_file.rs | 72.44% <100.00%> (+0.87%) |
:arrow_up: |
src/display.rs | 83.23% <100.00%> (-0.55%) |
:arrow_down: |
src/flags.rs | 96.87% <100.00%> (+0.10%) |
:arrow_up: |
tests/integration.rs | 100.00% <100.00%> (ø) |
... and 12 files with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
Thanks for the great work!
Hello! This is my first attempt to contribute something meaningful to this project so I don't know I'm doing it right. Thank you in advance for your feedback.
This adds the following CLI flags:
--truncate-owner-after
--truncate-owner-marker
And the following configuration fields:
The default behavior of LSD is unchanged.
The problem this change attempts to solve is the usability of the
-l
flag on systems where some user or group names are long but cannot be changed (e.g. the user is not admin and the account is managed in a central directory). In such cases, even with a decently sized terminal (90+ characters wide), lines often overflow, making the directory listing hard to read.Without this change, the only mitigation would consist in turning off the display of file ownership (via the
blocks
configuration field) which is unsatisfactory because ownership information is very useful.Default settings (the length of user/group name may seem exaggerated but it's actually the same length as my user/group name on machines I have to use):
With
--truncate-owner-after 7 --truncate-owner-marker …
:TODO
cargo fmt