1
0
mirror of https://github.com/sharkdp/bat.git synced 2025-06-29 19:53:18 +01:00

Don't add artificial newline to last line if --style=plain

This fixes .

Note however, that using a pager such as less will add a newline itself.
So to actually not print a newline for such files, you need to either
disable paging:

  bat --style=plain --paging=never no-newline-at-end-of-file.txt

or use a "pager" that does not add a newline:

  bat --style=plain --pager=cat no-newline-at-end-of-file.txt

Note that we also update syntax tests file since a bunch of them had
missing newlines on the last lines.
This commit is contained in:
Martin Nordholts
2020-12-16 19:22:31 +01:00
parent c3fc1b88fe
commit 68d525cd8b
17 changed files with 16 additions and 14 deletions
CHANGELOG.md
src
tests/syntax-tests
highlighted
Plaintext
source
ActionScript
Batch
Clojure
Dockerfile
Git Attributes
Git Config
Hosts
Makefile
PHP
Plaintext
PowerShell
RequirementsTXT
YAML
reStructuredText

@ -13,4 +13,4 @@
*.patch -text
.gitattributes linguist-language=gitattributes
.gitkeep export-ignore
.gitkeep export-ignore