diff options
author | Dylan Araps <dylan.araps@gmail.com> | 2019-01-13 13:50:44 +0200 |
---|---|---|
committer | Dylan Araps <dylan.araps@gmail.com> | 2019-01-13 13:50:44 +0200 |
commit | bf2f4e54f85bc2967b20085a94fd59001ea6a4f5 (patch) | |
tree | 9f666086f8f3108afdaf024ad7a3a1d31c374d1d | |
parent | c1691d082ae40194ec65f10db77b24da54512ec8 (diff) |
support for LS_COLORS
-rwxr-xr-x | fff | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -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 |