Closed nkh closed 3 years ago
I'm sorry, but this sounds far too specific. lscolors
(this repository) is mostly a library. The lscolors
command line tool is just provided as an example. Everyone is welcome to build more complex tools with that library.
Hi, I'd be cool to have these features:
"some input" | lscolors --length 10 --strip_start would output the input colored with a length of maximum of 10 characters, removing excess characters att the beginning of the input
"some input" | lscolors --length 10 --strip_end would output the input colored with a length of maximum of 10 characters , removing excess characters att the end of the input
a much fancy interface would be with a --printf so one could do something like :
stat somefile --printf "%x\t%f%y" | lscolors -d '\t' -printf "%5s %10lscolors_strip-end %s"
where %lscolors_strip_end is lscolors specific, it allows coloring of multiple files in the same input if wanted by the user and is a simple way to define a colorizer for stat or other commands listing files.
All this is to simplify short scripts, and make stat output a tad less dull in colored terminals, and can of course be dealt with outside lscolors