Skip to content

Commit

Permalink
set style/theme defaults for bat
Browse files Browse the repository at this point in the history
  • Loading branch information
wofr06 committed May 22, 2024
1 parent 52fa399 commit c20341d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lesspipe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -450,8 +450,9 @@ has_colorizer () {
grep -q -e '^--theme' "$HOME/.config/bat/config" || theme=ansi
fi
fi
[[ -n $style ]] && opt+=(--style="${style%% *}")
[[ -n $theme ]] && opt+=(--theme="${theme%%[|&;<>]*}")
[[ -z $style ]] && style=plain
[[ -z $theme ]] && theme=ansi
opt+=(--style="${style%% *}" --theme="${theme%%[|&;<>]*}")
opt+=("$COLOR" --paging=never "$1") ;;
pygmentize)
pygmentize -l "$lang" /dev/null &>/dev/null && opt=(-l "$lang") || opt=(-g)
Expand Down

0 comments on commit c20341d

Please sign in to comment.