The output looks a bit unbalanced when it's only printing the bottom horizontal line.

Would it make more sense to only print that final horizontal line when the header component is enabled?
Thank you for reporting this. It does look unbalanced, I agree.
If we skip the line completely, we wouldn't have any separation between different files. I think we should rather add a line on top?
I think ideally we would use one of the following formats:
(All lines):
-----------------------------------
1 | // This is file A
2 | // ...
-----------------------------------
1 | // This is file B
2 | // ...
-----------------------------------
(Separator lines):
1 | // This is file A
2 | // ...
-----------------------------------
1 | // This is file B
2 | // ...
The all lines format would look better with multiple files, but it feels a bit excessive to add the horizontal separator lines at the top and bottom for only a single file. Maybe a hybrid approach that uses all lines if more than one input file is given, but no lines otherwise?
$bat fileA.txt
1 | // This is file A
2 | // ...
$bat fileA.txt fileB.txt
-----------------------------------
1 | // This is file A
2 | // ...
-----------------------------------
1 | // This is file B
2 | // ...
-----------------------------------
I think I actually prefer option 1: all lines. Let's print a grid if the user asks for it :smile:
Fixed in bat v0.12.
Most helpful comment
I think I actually prefer option 1: all lines. Let's print a grid if the user asks for it :smile: