summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDylan Araps <dylan.araps@gmail.com>2018-10-21 12:58:51 +1100
committerDylan Araps <dylan.araps@gmail.com>2018-10-21 12:58:51 +1100
commitccbb680ce500073c1c4f866f9e28f807e354ac2c (patch)
treeca99f99fb7f643fcac8f353d3e766bef0591480c
parent3099cc576a03cb3bd02f87ba5af4f18888adcd52 (diff)
more color
-rw-r--r--README.md3
-rwxr-xr-xfff8
2 files changed, 7 insertions, 4 deletions
diff --git a/README.md b/README.md
index 27163a0..04cadd7 100644
--- a/README.md
+++ b/README.md
@@ -64,6 +64,9 @@ export FFF_COL1=2
# Status color [0-9]
export FFF_COL2=7
+# Selection color [0-9] (copied/moved files)
+export FFF_COL3=6
+
# Text Editor
export EDITOR="cmd"
```
diff --git a/fff b/fff
index 402aada..b9567bf 100755
--- a/fff
+++ b/fff
@@ -21,10 +21,10 @@ f_print() {
c="${#f[@]}"
for((i=${k:=0};i<(j=j>c?c:j);i++));{
((c<=0)) && { get_dir; f_print; return; } || path="${f[i]##*/}"
- [[ -d "${f[i]}" ]] && path="\\e[1m\\e[3${FFF_COL1:-2}m${path}/\\e[m"
- [[ "${f[i]}" == "${f[l]}" ]] && path="\\e[7m${path}\\e[m"
- [[ "$co" == "${f[i]}" ]] && path="\\e[1m\\e[38m\\e[7m${f[i]}\\e[m"
- printf '\e[K%b\n' "$path"
+ [[ -d ${f[i]} ]] && path="\\e[1m\\e[3${FFF_COL1:-2}m${path}/"
+ [[ ${f[i]} == "${f[l]}" ]] && path="\\e[7m${path}"
+ [[ $co == "${f[i]}" ]] && path="\\e[1m\\e[3${FFF_COL3:-6}m\\e[7m${f[i]}"
+ printf '\e[K%b\e[m\n' "$path"
}
printf '\e[3%sm\e[%s;H\e[K\n\e[K%b\e[m\e[H' "${FFF_COL2:-7}" "$((LINES-2))" \
"${PWD/\/\//\/} (${l:-1}/$((c-1))) ${co:+${pr[*]}: ${co##*/} [p]}"