Commit Graph

2743 Commits

Author SHA1 Message Date
sharkdp
ec2722d465 Use 'if let' instead of 'match' 2020-06-03 19:44:41 +02:00
Alex Novak
9e2ea5fdd4 Incorporating feedback 2020-06-03 19:44:41 +02:00
Alex Novak
48b4a6a906 Adds a little logic to main to get other mappings from config 2020-06-03 19:44:41 +02:00
Roy Ivy III
92e93682c6 Revert f8ed8aa7 (add test instrumentation to help understand failing tests) per PR feedback/owner request
- reverts commit f8ed8aa74b
2020-06-03 09:13:47 +02:00
Roy Ivy III
99226b745f Revert 9ed8db22c ('windows' pager process execution fix) based on PR feedback/owner request 2020-06-03 09:13:47 +02:00
Roy Ivy III
4840c7cd78 Tests ~ add predicate normalization for tests using echo 2020-06-03 09:13:47 +02:00
Roy Ivy III
71ab4a2058 Tests ~ revert to echo (after fixed 'windows' pager process execution) 2020-06-03 09:13:47 +02:00
Roy Ivy III
a2c09b41bc Fix pager process execution under 'windows'
## [why]

For 'windows' platforms, directly spawning a process (eg, called PATHNAME) bypasses the
usual windows shell machinery for determining which process to execute. Specifically,
the extensions in PATHEXT will not be used to determine the final executable. So,
`PATHNAME.bat`, `PATHNAME.cmd`, ... will *not* be executed even if on they exist on the
PATH; and this is counter to the usual expectation of a Windows user. Additionally,
built-in commands, such as `echo` and `dir`, will never be accessible as they do not
have a PATH to execute and, so, will never be found.

To use the usual machinery, giving access to PATHNAME.bat and `echo`, execute the PATHNAME
using the windows shell, eg `cmd /d/c PATHNAME`. Note this may expose the constructed
command line to the windows shell quoting vagaries (sadly, that may be part of the price).

Following Windows standards, the ComSpec environment variable is used to determine which
shell to use, with a fallback to the "modern", built-in `cmd` shell.
2020-06-03 09:13:47 +02:00
Roy Ivy III
0ef792ac1e Tests ~ (fix) always check out test fixtures with known LF line endings
- fixes windows test failures
- avoids `git` platform-dependent conversion of line endings for checkout of test fixtures (*tests/examples/...*)
2020-06-03 09:13:47 +02:00
Roy Ivy III
01af28b781 Tests ~ add instrumentation to visualize text differences in failing tests 2020-06-03 09:13:47 +02:00
Roy Ivy III
3a7743ffc5 Tests ~ echo has portability issues; for CI, replace with printf
- using `echo` on 'windows' platforms requires process execution indirectly via the shell
- `printf` is available on all GHA CI platforms
  - `printf` is *not* available on usual 'windows' platforms; so this is just temporizing, awaiting a true fix
2020-06-03 09:13:47 +02:00
Roy Ivy III
9cc8e52512 Fix compiler warning for 'windows' tests (dead_code) 2020-06-03 09:13:47 +02:00
Roy Ivy III
698a6b5acf Maint/CICD ~ GHA - add additional linux builds and packaging support 2020-06-03 09:13:47 +02:00
Roy Ivy III
7a51c7fd30 Maint/CICD ~ GHA - disable windows-gnu builds with unresolvable linker errors
- `undefined reference to `_imp____acrt_iob_func'`

- ref: <https://github.com/rust-lang/rust/issues/68887#issuecomment-615877016>
- ref: <https://users.rust-lang.org/t/linking-with-gcc-failed-exit-code-1/34124>
- ref: <https://www.gitmemory.com/issue/rust-lang/rust/47048/530376978>
- ref: <https://sourceforge.net/p/mingw-w64/mailman/mingw-w64-public/?limit=250&page=7>
2020-06-03 09:13:47 +02:00
Roy Ivy III
7c3e9f81cb Maint/CI ~ add GitHub-Actions CI (aka GHA) 2020-06-03 09:13:47 +02:00
Alexander Jackson
6e3e7dafca Clarify more wording when reading from stdin
Update the word 'initial' to be 'first', as this is more ubiquitous and
potentially easier for non-native speakers.

Clarify that it is the highlighting that may not work, and the input
will still be displayed regardless.
2020-06-03 09:01:23 +02:00
Alexander Jackson
fca83bf79a Clarify stdin syntax highlighting in the README
Clarify the requirements for automatic syntax highlighting when reading
input from stdin. Fixes #1028.
2020-06-03 09:01:23 +02:00
vwvw
b8ffb8d463 fix typo in readme 2020-06-02 21:53:50 +02:00
dependabot-preview[bot]
1dae5bbc95 Bump semver from 0.9.0 to 0.10.0
Bumps [semver](https://github.com/steveklabnik/semver) from 0.9.0 to 0.10.0.
- [Release notes](https://github.com/steveklabnik/semver/releases)
- [Commits](https://github.com/steveklabnik/semver/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-01 10:40:05 +02:00
dependabot-preview[bot]
1a1932b67a Bump console from 0.11.2 to 0.11.3
Bumps [console](https://github.com/mitsuhiko/console) from 0.11.2 to 0.11.3.
- [Release notes](https://github.com/mitsuhiko/console/releases)
- [Commits](https://github.com/mitsuhiko/console/compare/0.11.2...v0.11.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-01 10:39:23 +02:00
dependabot-preview[bot]
8be375e75b Bump git2 from 0.13.5 to 0.13.6
Bumps [git2](https://github.com/rust-lang/git2-rs) from 0.13.5 to 0.13.6.
- [Release notes](https://github.com/rust-lang/git2-rs/releases)
- [Commits](https://github.com/rust-lang/git2-rs/compare/0.13.5...0.13.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-01 09:56:01 +02:00
dependabot-preview[bot]
e63e4232db Bump serde from 1.0.110 to 1.0.111
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.110 to 1.0.111.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.110...v1.0.111)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-01 09:55:32 +02:00
sharkdp
cef04665eb Manually convert Crystal.sublime-syntax 2020-06-01 09:54:46 +02:00
dependabot-preview[bot]
76569b9527 Bump assets/syntaxes/02_Extra/Crystal from 2ee9d66 to 5e032ff
Bumps [assets/syntaxes/02_Extra/Crystal](https://github.com/crystal-lang-tools/sublime-crystal) from `2ee9d66` to `5e032ff`.
- [Release notes](https://github.com/crystal-lang-tools/sublime-crystal/releases)
- [Commits](2ee9d667ae...5e032ff5f5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-01 09:54:46 +02:00
sharkdp
1d46eb8ea3 Manually convert TypeScript.sublime-syntax 2020-06-01 09:50:30 +02:00
dependabot-preview[bot]
6b79ac995e Bump assets/syntaxes/02_Extra/TypeScript from 9cd994a to f21aba5
Bumps [assets/syntaxes/02_Extra/TypeScript](https://github.com/Microsoft/TypeScript-Sublime-Plugin) from `9cd994a` to `f21aba5`.
- [Release notes](https://github.com/Microsoft/TypeScript-Sublime-Plugin/releases)
- [Commits](9cd994af73...f21aba57c5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-01 09:50:30 +02:00
dependabot-preview[bot]
ee928b034e Bump assets/syntaxes/02_Extra/Elixir from 1f010d5 to d223f67
Bumps [assets/syntaxes/02_Extra/Elixir](https://github.com/princemaple/elixir-sublime-syntax) from `1f010d5` to `d223f67`.
- [Release notes](https://github.com/princemaple/elixir-sublime-syntax/releases)
- [Commits](1f010d5f63...d223f67612)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-01 09:31:28 +02:00
dependabot-preview[bot]
fc5790eb4a Bump assets/syntaxes/02_Extra/LESS from 3020993 to 44632e1
Bumps [assets/syntaxes/02_Extra/LESS](https://github.com/danro/LESS-sublime) from `3020993` to `44632e1`.
- [Release notes](https://github.com/danro/LESS-sublime/releases)
- [Commits](3020993658...44632e19af)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-01 09:30:26 +02:00
dependabot-preview[bot]
5213ffee0e Bump clap from 2.33.0 to 2.33.1
Bumps [clap](https://github.com/clap-rs/clap) from 2.33.0 to 2.33.1.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/v2.33.1/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v2.33.0...v2.33.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-01 08:44:09 +02:00
sharkdp
5ebf0215c5 Update CHANGELOG 2020-05-29 22:14:20 +02:00
Ethan P
9957da6b93 Remove <font> tag from CHANGELOG.md 2020-05-29 22:13:10 +02:00
Ethan P
342cae2dc6 Change use of 'BatInput' to 'input::Input' 2020-05-29 22:13:10 +02:00
Ethan P
d2b26a5f1f Remove unnecessary '-> ()'s 2020-05-29 22:13:10 +02:00
Ethan P
9d08c0102e Replace Input::stdin_as_file with bat-application functions 2020-05-29 22:13:10 +02:00
Ethan P
a3357547ea Remove unused with_name for theme preview file 2020-05-29 22:13:10 +02:00
Ethan P
7a9decad70 Remove Input.as_file and add Input::stdin_as_file 2020-05-29 22:13:10 +02:00
Ethan P
c4d0d068e4 Update input API example 2020-05-29 22:13:10 +02:00
Ethan P
c03a027240 Move PR changes in README to unreleased section 2020-05-29 22:13:10 +02:00
Ethan P
a8d7141c4c Improve documentation for Input API 2020-05-29 22:13:10 +02:00
Ethan P
3eb704e016 Update examples 2020-05-29 22:13:10 +02:00
Ethan P
0f06d3b90d Reexport bat::pretty_printer::Input as bat::Input 2020-05-29 22:13:10 +02:00
Ethan P
589c94aa93 Fix regression with --list-themes and --language 2020-05-29 22:13:10 +02:00
Ethan P
798b742617 Refactor InputDescription API into Input API 2020-05-29 22:13:10 +02:00
Ethan P
11a72ab765 Fix a typo 2020-05-29 22:13:10 +02:00
Ethan P
0319149b4d [breaking] Remove special handling for theme previews 2020-05-29 22:13:10 +02:00
Ethan P
2f823d59b0 Add PrettyPrinter::input function 2020-05-29 22:13:10 +02:00
Ethan P
981352992b Add InputDescription API 2020-05-29 22:13:10 +02:00
Ethan P
384ea38bd9 Add documentation to InputDescription 2020-05-29 22:13:10 +02:00
Ryan Tolboom
268c0963b4 Updated AsciiDoc syntax submodule 2020-05-29 22:12:28 +02:00
Ethan P
8b481dd41f Add support for NO_COLOR env var (#1021) 2020-05-28 21:49:10 +02:00