Skip to content

Commit 4bdafb9

Browse files
committed
common: log_file_bat(): work with Debian's bat pkg; never use pager
- `bat` is called `batcat` in Debian's `bat` package - `--paging=never` so it won't hang Signed-off-by: Ricardo Pardini <[email protected]>
1 parent 5dad80b commit 4bdafb9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bash/common.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ function log_file_bat() {
4747
extra_bat_args+=("--language=${bat_language}")
4848
fi
4949
if command -v bat > /dev/null; then
50-
bat --color=always "${extra_bat_args[@]}" "${file}"
50+
bat --color=always --paging=never "${extra_bat_args[@]}" "${file}"
51+
elif command -v batcat > /dev/null; then
52+
batcat --color=always --paging=never "${extra_bat_args[@]}" "${file}"
5153
else
5254
log "${level}" "'bat' utility not installed; install it to see file contents in logs."
5355
fi

0 commit comments

Comments
 (0)