summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDylan Araps <dylan.araps@gmail.com>2019-01-13 15:03:21 +0200
committerDylan Araps <dylan.araps@gmail.com>2019-01-13 15:03:21 +0200
commit6e0d5f30011ea284bac819432b16f57cde2b0ddc (patch)
tree3c809107cd648e9d1535aba9ae1cf64b8e8b0901
parentbf952a3a88c4ab8e2fedd4332a0245419b5da196 (diff)
fixed ls_colors not supporting additional format
-rwxr-xr-xfff8
1 files changed, 5 insertions, 3 deletions
diff --git a/fff b/fff
index c6d6ebc..3679d12 100755
--- a/fff
+++ b/fff
@@ -73,19 +73,21 @@ get_cursor_pos() {
get_ls_colors() {
# Parse the LS_COLORS variable and source each file type
# as a separate variable.
- # Format: :*.ext=0;0:*.jpg=0;0;0:
+ # Format: :.ext=0;0:*.jpg=0;0;0:*png=0;0;0;0:
[[ -z $LS_COLORS ]] && {
FFF_LS_COLORS=0
return
}
- ls_cols="${LS_COLORS//\*./file_}"
+ ls_cols="${LS_COLORS//:\*./:file_}"
+ ls_cols="${ls_cols//:./:file_}"
+ ls_cols="${ls_cols//:\*/:file_}"
ls_cols="${ls_cols//=/=\'}"
ls_cols="${ls_cols//:/\';}"
# bash 3 compatible method of sourcing a variable.
# shellcheck source=/dev/null
- source /dev/stdin <<< "$ls_cols"
+ source /dev/stdin <<< "$ls_cols" >/dev/null 2>&1
}
status_line() {