diff options
author | Jakob Kaivo <jkk@ung.org> | 2018-10-07 22:15:18 -0400 |
---|---|---|
committer | Jakob Kaivo <jkk@ung.org> | 2018-10-07 22:15:18 -0400 |
commit | d63fc8856af454356a1c02c2a7a61850c4034bab (patch) | |
tree | 69fada426cbd448f9821822039ad7a30c7c063fc | |
parent | a92f5fd452973aec2a6c0c788a7b05f17e3e260a (diff) |
still color symlinks in long listings
-rwxr-xr-x | color-ls | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -1,4 +1,5 @@ #!/bin/sh + # MIT License # # Copyright (c) 2018 Jakob Kaivo @@ -21,6 +22,8 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. +# TODO: handle recursive stuff + output=-x # TODO: change this back to -C when that is fixed dash_F=-F dash_1='' @@ -115,13 +118,15 @@ _output () { esac } +# TODO: grab first character from long listings _colorize () { awk -vcolor=0 ' + { color=39; } /\/$/ { color=34; } /\*$/ { color=32; } /\|$/ { color=33; } /@$/ { color=35; } - /[^/@*|]$/ { color=39; } + / -> / { color=35; } { printf("\033\[%sm%s\033\[0m\n", color, $0); }' } |