check isatty for underline in --header
Fixes #775
The isatty check code is copied from core.rs
This PR was drafted very quickly with ripgrep and minimal reading. Hence, it might not be the ideal way to do things. Let me know if you want anything to be changed.
TODO
- [x] Use
cargo fmt - [x] Add necessary tests
- [x] Add changelog entry
- [x] Update default config/theme in README (if applicable)
- [x] Update man page at lsd/doc/lsd.md (if applicable)
Codecov Report
Merging #777 (bee7627) into master (f5ee0a2) will decrease coverage by
0.01%. The diff coverage is60.00%.
@@ Coverage Diff @@
## master #777 +/- ##
==========================================
- Coverage 86.68% 86.66% -0.02%
==========================================
Files 44 44
Lines 4332 4334 +2
==========================================
+ Hits 3755 3756 +1
- Misses 577 578 +1
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/display.rs | 84.02% <60.00%> (-0.18%) |
:arrow_down: |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
I think it might be better to control it here by changing Header to take more states just to keep it consistent. We should retain the external cli interface the same though.
Okay, I will take a look at this later in the day.