batpipe: Fix colors not showing up inside less

This commit is contained in:
Ethan P 2021-08-21 16:19:17 -07:00
parent d8532bb35a
commit 7803ecaba1
No known key found for this signature in database
GPG Key ID: 6963FD04F6CF35EA

View File

@ -115,7 +115,7 @@ BATPIPE_INSIDE_LESS=false
BATPIPE_INSIDE_BAT=false
TERM_WIDTH="$(term_width)"
if [[ "$(basename -- "$(parent_executable "$(parent_executable_pid)" | cut -f1 -d' ')")" == less ]]; then
if [[ "$(basename -- "$(parent_executable | cut -f1 -d' ')")" == less ]]; then
BATPIPE_INSIDE_LESS=true
elif [[ "$(basename -- "$(parent_executable | cut -f1 -d' ')")" == "$(basename -- "$EXECUTABLE_BAT")" ]]; then
BATPIPE_INSIDE_BAT=true