summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDylan Araps <dylan.araps@gmail.com>2019-01-13 13:50:44 +0200
committerDylan Araps <dylan.araps@gmail.com>2019-01-13 13:50:44 +0200
commitbf2f4e54f85bc2967b20085a94fd59001ea6a4f5 (patch)
tree9f666086f8f3108afdaf024ad7a3a1d31c374d1d
parentc1691d082ae40194ec65f10db77b24da54512ec8 (diff)
support for LS_COLORS
-rwxr-xr-xfff14
1 files changed, 7 insertions, 7 deletions
diff --git a/fff b/fff
index cbb7d06..817babf 100755
--- a/fff
+++ b/fff
@@ -134,7 +134,7 @@ read_dir() {
print_line() {
# Format the list item and print it.
- local file_name="${list[$1]##*/}"
+ # local file_name="${list[$1]##*/}"
# local file_ext="${file_name##*.}"
if [[ -d ${list[$1]} ]]; then
@@ -142,22 +142,22 @@ print_line() {
local suffix+='/'
elif [[ -b ${list[$1]} ]]; then
- local format+="\\e[${bd}m"
+ local format+="\\e[${bd:-40;33;01}m"
elif [[ -c ${list[$1]} ]]; then
- local format+="\\e[${cd}m"
+ local format+="\\e[${cd:-40;33;01}m"
elif [[ -x ${list[$1]} ]]; then
- local format+="\\e[${ex}m"
+ local format+="\\e[${ex:-01;32}m"
elif [[ -h ${list[$1]} ]]; then
- local format+="\\e[${ln}m"
+ local format+="\\e[${ln:-01;36}m"
elif [[ -p ${list[$1]} ]]; then
- local format+="\\e[${pi}m"
+ local format+="\\e[${pi:-40;33}m"
elif [[ -S ${list[$1]} ]]; then
- local format+="\\e[${so}m"
+ local format+="\\e[${so:-01;35}m"
# elif [[ $file_ext != "$file_name" &&
# $LS_COLORS == *."$file_ext"=* ]]; then