Skip to content

Commit

Permalink
respect bat options from LESSCOLORIZER
Browse files Browse the repository at this point in the history
  • Loading branch information
wofr06 committed Feb 2, 2024
1 parent 938d746 commit 641d790
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
****************************************************************************
# ChangeLog for lesspipe.sh #
****************************************************************************
- respect bat options from LESSCOLORIZER
- propagate lesspipe changes to lesscomplete
- don't use antiword any longer, outdated
- use 7zip instead of now outdated p7zip if available
Expand Down
2 changes: 2 additions & 0 deletions lesspipe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,8 @@ has_colorizer () {
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
opt+=("$COLOR" --paging=never "$1") ;;
pygmentize)
Expand Down

0 comments on commit 641d790

Please sign in to comment.