diff options
author | Dylan Araps <dylan.araps@gmail.com> | 2019-01-13 15:03:21 +0200 |
---|---|---|
committer | Dylan Araps <dylan.araps@gmail.com> | 2019-01-13 15:03:21 +0200 |
commit | 6e0d5f30011ea284bac819432b16f57cde2b0ddc (patch) | |
tree | 3c809107cd648e9d1535aba9ae1cf64b8e8b0901 | |
parent | bf952a3a88c4ab8e2fedd4332a0245419b5da196 (diff) |
fixed ls_colors not supporting additional format
-rwxr-xr-x | fff | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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() { |