From 368d444b1bb2678ea086dfd88e112ae19d9a8a70 Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Sun, 7 Oct 2018 23:12:32 -0400 Subject: match executables in long format and directory names in recursive long formats --- color-ls | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/color-ls b/color-ls index adf4167..ff7e7a7 100755 --- a/color-ls +++ b/color-ls @@ -124,8 +124,8 @@ _output () { _colorize () { awk -vcolor=0 -vlong=${long} ' { color=39; } - /\/$/ || (long && /^d/) { color=34; } - /\*$/ { color=32; } + /\/$/ || (long && /^d/) || (long && $0 == $1) { color=34; } + /\*$/ || (long && /^-/ && $1 ~ /x/){ color=32; } /\|$/ || (long && /^p/) { color=33; } /@$/ || (long && /^l/) { color=35; } long { printf("\033\[%sm%s\033\[0m\n", color, $0); }' -- cgit v1.2.1