wofr06 / lesspipe

lesspipe - display more with less
GNU General Public License v2.0
484 stars 51 forks source link

LESSCOLORIZER options for bat are not applied if bat configuration file is absent #144

Closed growler closed 8 months ago

growler commented 8 months ago

I believe this piece was meant to look like this:

      if [[ -r "$HOME/.config/bat/config" ]]; then
        grep -q -e '^--style' "$HOME/.config/bat/config" || opt+=(--style="${style%% *}")
        grep -q -e '^--theme' "$HOME/.config/bat/config" || opt+=(--theme="${theme%% *}")
      else
        opt+=(--style="${style%% *}" --theme="${theme%% *}")
      fi

Otherwise, options from LESSCOLORIZER are not applied unless there is a ~/.config/bat/config file.

wofr06 commented 8 months ago

Thanks, code changed