lscolors
lscolors copied to clipboard
Option to output colored file name only
Given "aaa/bbb/entry" return only "color + entry + color reset".
Use case:
I have "$HOME/downloads", which happens to be a link, and a lot of other files from different directories in a list and want to colorize them.
The only way to get correct colorization is to be in the right directory for each entry in the list, this means starting a process for each entry and is prohibitively expensive.
I can send the full path but then I'd have to parse the colored string.
An alternative would be to output the colored path and the colored entry on different lines.