lsd
lsd copied to clipboard
Extract a symlink's target type if possible, so it can have proper colors.
Extract a symlink's target type if possible, so it can have proper colors.
Before:

After:
- [X] Use
cargo fmt - [X] Add necessary tests
- [X] Add changelog entry
Codecov Report
Merging #563 (ea64953) into master (74c1206) will decrease coverage by
0.35%. The diff coverage is20.00%.
@@ Coverage Diff @@
## master #563 +/- ##
==========================================
- Coverage 86.73% 86.38% -0.36%
==========================================
Files 37 37
Lines 3800 3819 +19
==========================================
+ Hits 3296 3299 +3
- Misses 504 520 +16
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/meta/symlink.rs | 55.84% <20.00%> (-13.13%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 74c1206...ea64953. Read the comment docs.
oh, my bad, I got you wrong! could you add some tests for this feature and we can pass the CI
Hey, what sort of tests would you like? Since it's pretty much just pattern matching.
We should probably colors the items using lscolors and not just builtin colors.
@meain the coloring is using the default mechanism, it would already use the LSCOLOR if I get the coloring logic right.
Ahh, my bad I misread what the code was doing.
@dsully I found a small issue in the code. If the symlink is relative and we are not calling lsd from the same directory that it was symlinked from, it does not work.
cd /tmp
mkdir -p test/{a,b}
cd test
touch a/file
cd b
ln -s ../a/file file
cd ..
lsd -ld b/file
Ok, I'll take a look.