Commit Graph

1722 Commits (171d215f910cd21e6ec07eac20a05b0403444b48)
 

Author SHA1 Message Date
Ensar Sarajčić 171d215f91 Add case from #1604 to VimL syntax-test source 4 years ago
Ensar Sarajčić cc6109a751 Add syntax highlighting tests for VimL
Adds a syntax highlighting test for VimL
with source file based on parts of my own configuration
changed to cover as much of syntax as possible.

**NOTES:**
Last line of source (`syntax enable`) does not get highlighted,
since `syntax` keyword is not part of highlighting rules.

Related to #1213
4 years ago
Martin Nordholts 47bb4a9c0f Introduce bat_warning! helper macro
This macro is intended to be package-internal and is not to be
considered part of the public lib API.

Use it in three places to reduce code duplication. However, main reason
for this refactoring is to allow us to fix #1063 without duplicating the
code yet another time.

The macro can also be used for the "Binary content from {} will not be
printed to the terminal" message if that message starts to use eprintln!
instead (if ever).

To trigger/verify the changed code, the following commands can be used:

    cargo run -- --theme=ansi-light tests/examples/single-line.txt
    cargo run -- --theme=does-not-exist tests/examples/single-line.txt
    cargo run -- --style=grid,rule tests/examples/single-line.txt
4 years ago
Marco Ieni b149ea91dd Cargo.toml: remove "readme" field 4 years ago
Martin Nordholts 6d1c7d5f57 Fix clippy::if_same_then_else warning in --paging=auto logic 4 years ago
David Peter 07bd7503c5 Update CHANGELOG.md 4 years ago
John Meow 1b5af89ddd Move changelog entry to unreleased 4 years ago
John Meow 3d07dec8fd Use Briles/gruvbox .tmTheme files instead of peaceant's port 4 years ago
Martin Nordholts a63bb08eda Add test 'grid_for_file_without_newline' (for issue #299 fix)
This is a regression test for the fix for issue #299. If that fix is
reverted, currently only one test ('header_padding') fails. But that
test is for a different use case, so add a dedicated regression test for
the particular use case issue #299 is about.
4 years ago
sharkdp e0207f8167 Fix test 4 years ago
Mitchell Kember 3099f51ba7 Add ansi theme to replace ansi-light and ansi-dark
This combines ansi-light and ansi-dark into a single theme that works
with both light and dark backgrounds. Instead of specifying white/black,
the ansi theme uses the terminal's default foreground/background color
by setting alpha=01, i.e. #00000001. This is in addition to the alpha=00
encoding where red contains an ANSI color palette number.

Now, `--theme ansi-light` and `--theme ansi-dark` will print a
deprecation notice and use ansi instead (unless the user has a custom
theme named ansi-light or ansi-dark, which would take precedence).
4 years ago
sharkdp 19e7763f35 Add changelog entry 4 years ago
David Peter 73cff42ec9 Remove commented-out line from Cargo.toml 4 years ago
Lovecraftian Horror b349155f2f Remove repeated `contains` calls 4 years ago
sharkdp ab4c120ea5 Highlight 'batcat' note in README, see #1420 4 years ago
David Peter 947133d295 Update CHANGELOG.md 4 years ago
Stefan Kunkel bf96e6e642 make bat -L use plain style 4 years ago
Stefan Kunkel cffacad306 make bat -L use pager 4 years ago
David Peter cc7b89faf8
Merge pull request #1440 from Enselic/fix-1438-newline-can-be-added-even-if-style-plain
Don't add artificial newline to last line if --style=plain
4 years ago
chris48s c1e4746d50 change docs dir name to match package name
i.e: docs for bat-musl go in /usr/share/doc/bat-musl
not /usr/share/doc/bat
4 years ago
chris48s 8331eec7fc include changelog in package
in line with debian changelog/release notes guidance
https://www.debian.org/doc/debian-policy/ch-docs.html#changelog-files-and-release-notes
resolves changelog-file-missing-in-native-package
https://lintian.debian.org/tags/changelog-file-missing-in-native-package.html
4 years ago
chris48s 0547068ed0 include years in copyright notice
This brings the copyright notice into line with the expected format
resolves copyright-without-copyright-notice
https://lintian.debian.org/tags/copyright-without-copyright-notice.html
4 years ago
chris48s 18d8389785 ensure copyright is mode 644
resolves non-standard-file-perm
https://lintian.debian.org/tags/non-standard-file-perm.html
4 years ago
chris48s 165d25d941 remove leading article from description
resolves description-synopsis-starts-with-article
https://lintian.debian.org/tags/description-synopsis-starts-with-article.html
4 years ago
chris48s c4fb77b042 invoke gzip with -n
resolves package-contains-timestamped-gzip
https://lintian.debian.org/tags/package-contains-timestamped-gzip.html
4 years ago
VeryTastyTomato 973ea984c8 fix: warnings of ShellCheck
SC2155: Declare and assign separately to avoid masking return values.
SC2164: Use cd ... || exit in case cd fails.
SC2230: which is non-standard. Use builtin 'command -v' instead.
4 years ago
sharkdp 3e9afe2974 Add integration test for nonexisting newline 4 years ago
David Peter 73c16574e6
Merge branch 'master' into fix-1438-newline-can-be-added-even-if-style-plain 4 years ago
Martin Nordholts 60e00d49a9
Fix #1443 macOS: regression_test.sh: mktemp: illegal option (#1444)
The macOS version of mktemp does not recognize the --suffix option.
Using pure -d should work since, it seems [1], macOS 10.11 however.

So to make the script work on macOS, stop using the --suffix option.

The downside is of course that the temporary dir will have an anonymous
name, but I see no risk of confusion given how short-lived the usage of
the dir is, and given the context it is used.

[1] https://unix.stackexchange.com/questions/30091/fix-or-alternative-for-mktemp-in-os-x
4 years ago
Keith Hall 2d22c705ba
Merge pull request #1439 from rsteube/themes-help-interactive-only
only print themes hint in interactive mode
4 years ago
Martin Nordholts 68d525cd8b Don't add artificial newline to last line if --style=plain
This fixes #1438.

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.
4 years ago
Martin Nordholts c3fc1b88fe replace_nonprintable: Keep \n around
Since it has a functional role, we can not just replace it, we must keep
it around. This also allows us to simplify the code slightly.

We must fix this before we fix #1438 since otherwise the \n will be
missing with --style=plain, since we will stop adding it if it is
missing.
4 years ago
rsteube 84b0702399 only print themes hint in interactive mode 4 years ago
purvesh-linux11 f3489ffa29 add packaging in unreleased section 4 years ago
purvesh-linux11 8e6ba2a3e1 update changelog file 4 years ago
purvesh-linux11 48e799e7a6 changing snap name to batcat 4 years ago
purvesh-linux11 bc01999f0d update chagelog.md 4 years ago
purvesh-linux11 b0fcb3065f add snap installtion command 4 years ago
sharkdp 94d8cd5100 Minor fixes in CONTRIBUTING.md 4 years ago
dependabot-preview[bot] 5596c6133b Bump assets/syntaxes/02_Extra/ssh-config from `1ddcb32` to `201816b`
Bumps [assets/syntaxes/02_Extra/ssh-config](https://github.com/robballou/sublimetext-sshconfig) from `1ddcb32` to `201816b`.
- [Release notes](https://github.com/robballou/sublimetext-sshconfig/releases)
- [Commits](1ddcb320ac...201816b609)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
4 years ago
dependabot-preview[bot] 304332e380 Bump assets/syntaxes/02_Extra/GraphQL from `c9d8458` to `59304d6`
Bumps [assets/syntaxes/02_Extra/GraphQL](https://github.com/dncrews/GraphQL-SublimeText3) from `c9d8458` to `59304d6`.
- [Release notes](https://github.com/dncrews/GraphQL-SublimeText3/releases)
- [Commits](c9d84587eb...59304d6c7b)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
4 years ago
dependabot-preview[bot] fb989d8c94 Bump assets/syntaxes/02_Extra/Svelte from `bf92f5b` to `aee0676`
Bumps [assets/syntaxes/02_Extra/Svelte](https://github.com/corneliusio/svelte-sublime) from `bf92f5b` to `aee0676`.
- [Release notes](https://github.com/corneliusio/svelte-sublime/releases)
- [Commits](bf92f5b7b6...aee0676f37)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
4 years ago
dependabot-preview[bot] 026220b960 Bump assets/syntaxes/02_Extra/AWK from `e593eb6` to `e23926e`
Bumps [assets/syntaxes/02_Extra/AWK](https://github.com/JohnNilsson/awk-sublime) from `e593eb6` to `e23926e`.
- [Release notes](https://github.com/JohnNilsson/awk-sublime/releases)
- [Commits](e593eb6d42...e23926eca1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
4 years ago
dependabot-preview[bot] 543a253bc1 Bump assets/themes/Coldark from `b4a1c74` to `e44750b`
Bumps [assets/themes/Coldark](https://github.com/ArmandPhilippot/coldark-bat) from `b4a1c74` to `e44750b`.
- [Release notes](https://github.com/ArmandPhilippot/coldark-bat/releases)
- [Commits](b4a1c74d8d...e44750b2a9)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
4 years ago
dependabot-preview[bot] 8f8e44e87a Bump assert_cmd from 1.0.1 to 1.0.2
Bumps [assert_cmd](https://github.com/assert-rs/assert_cmd) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/assert-rs/assert_cmd/releases)
- [Changelog](https://github.com/assert-rs/assert_cmd/blob/master/CHANGELOG.md)
- [Commits](https://github.com/assert-rs/assert_cmd/compare/v1.0.1...v1.0.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
4 years ago
Deshdeepak 2da11097f9 Update with termux installation 4 years ago
chris48s d124ebeced only try to publish one set of archives/packages for linux x64 4 years ago
sharkdp 6d981498d8 Bump version to 0.17.1 4 years ago
sharkdp bd2e9917da Revert "Add cycle detection integration tests"
This reverts commit ec60d84265.
4 years ago
sharkdp a6810e3353 Revert "Add io cycle detection with clircle"
This reverts commit aa2ae19dfd.
4 years ago