Commit Graph

127 Commits

Author SHA1 Message Date
Ethan P
81bf3fdf66
Update README to add section on installing with Homebrew 2020-04-01 14:31:38 -07:00
Ethan P
47c15dd264
Fix regression where --color would no longer work by itself 2020-04-01 13:40:57 -07:00
Ethan P
1be18569c9
Create release.sh script to make release process easier 2020-04-01 13:39:23 -07:00
Ethan P
94ca32b0db
opt_hooks.sh: Add checks for invalid --color and --paging 2020-04-01 12:59:30 -07:00
Ethan P
f8d6dc83f3
prettybat.sh: Convert debug print to option 2020-04-01 12:56:29 -07:00
Ethan P
1c73b97343
Fix build.sh --no-verify argument taking unnecessary value 2020-04-01 12:53:17 -07:00
Ethan P
4d788b4453
Update submodules 2020-04-01 12:51:57 -07:00
Ethan P
b1ccd08034
Update snapshots 2020-04-01 12:51:29 -07:00
Ethan P
4e9ff8a4fa
Merge pull request #15 from VeryTastyTomato/master
Fix most of warnings reported by ShellCheck and format files
2020-04-01 12:50:31 -07:00
Ethan P
e48f1b5926
Fix more shellcheck warnings 2020-04-01 12:49:55 -07:00
Ethan P
07c2cabc81
Fix small formatting and logic regressions 2020-04-01 12:47:21 -07:00
Éfrit
f4765bfa54 Fix most of the errors and warnings reported by shellcheck 2020-04-01 02:55:41 +02:00
Éfrit
73aafa56e1 Format with vs-shell-format 2020-04-01 02:55:41 +02:00
Éfrit
30f5508bc3 Remove superfluous newline 2020-04-01 02:55:41 +02:00
Éfrit
6ed8696abd Format with redhat.vscode-yaml 2020-04-01 02:55:38 +02:00
Ethan P
6b57f3ff3c
Fix invalid snapshot 2020-02-19 21:33:58 -08:00
Ethan P
ef9def267f
Add executable shim for bat which enforces a theme 2020-02-19 21:33:40 -08:00
Ethan P
f8a9009503
Use verbose testing for CI 2020-02-19 21:17:40 -08:00
Ethan P
dee092dcb9
Use fake HOME for tests 2020-02-19 21:16:52 -08:00
Ethan P
531dcd6c19
Add executable shim for tput to ensure consistent size 2020-02-19 21:10:56 -08:00
Ethan P
f7200c7086
Update CI to only test consistency if regular tests pass 2020-02-19 21:02:58 -08:00
Ethan P
c070ae7f3a
Update 'best' to latest master 2020-02-19 21:01:59 -08:00
Ethan P
67d71fdb1f
Fix test.sh auto submodule initialization 2020-02-19 20:52:34 -08:00
Ethan P
88e71bbb38
Update to use 'best' for testing 2020-02-19 20:49:20 -08:00
Ethan P
5cbbbb6ebc
batman: Add support for MANPAGER environment variable 2020-02-15 15:10:18 -08:00
Ethan P
4b17464c6e
Fix invalid markdown in README and add IDEA files to gitignore 2020-02-15 15:04:30 -08:00
Ethan P
765658c23d
Fix regression caused by attempted fix of #6 2020-01-21 14:10:14 -08:00
Ethan P
dcb1a7e54c
Fix CI build by adding edge/community repository 2020-01-21 10:11:33 -08:00
Ethan P
e0b9819859
Add relative symlink test 2020-01-21 09:58:26 -08:00
Ethan P
c74d47ecd0
Attempt fix for #6 2020-01-21 09:57:55 -08:00
Ethan P
441eed7c52
Rename symlink tests 2020-01-21 09:41:24 -08:00
Ethan P
4c1ebac719
Fix CI build warning by installing shfmt 2020-01-18 15:38:39 -08:00
Ethan P
963762f4b6
Fix CI by using GNU coreutils 2020-01-18 15:37:44 -08:00
Ethan P
5c9920827f
Add test for running from a symlink 2020-01-18 15:31:25 -08:00
Ethan P
ab38bb254c
Fix incorrect width being passed to 'bat' in batgrep with pager 2020-01-17 20:52:58 -08:00
Ethan P
72b09b4416
Fix pager_name to print name of unknown pagers 2020-01-17 20:50:26 -08:00
Ethan P
49dfb332c1
Merge pull request #9 from HarrisonMc555/search-pattern
Add --search-pattern option to tell less to search for pattern
2020-01-17 20:46:27 -08:00
Ethan P
d7949c4bf3
Change --less-search-pattern to --search-pattern in docs 2020-01-17 20:44:58 -08:00
Ethan P
c78bb6d592
Fix boolean conditional branching 2020-01-17 20:42:18 -08:00
Ethan P
3e9969de76
Add message for --search-pattern and no pager
I should probably find a more elegant way to split
an error message across multiple lines in the future.
2020-01-17 20:39:32 -08:00
Ethan P
63a9929592
Merge branch 'master' into search-pattern 2020-01-17 20:30:43 -08:00
Harrison McCullough
0cda564175 Make changes according to feedback
Most of these are simple changes. I added an `is_pager_less` and a `get_pager`
function to `pager.sh`. In order for this function to be available for use
inside `pager.sh`, I had to define the functions before setting defaults.

The `is_pager_less` function is then used for the `--search-pattern` to see if
the `$SCRIPT_PAGER` supports the `--search-pattern` flag. Right now, the only
supported pager is `less`.
2020-01-17 23:09:59 -05:00
Ethan P
0fa396fbcb
Add pager_name function to pager.sh 2020-01-17 17:06:00 -08:00
Ethan P
c80d107d1c
Disabled pager test due to inconsistencies 2020-01-17 16:56:18 -08:00
Harrison McCullough
67f1ff9c0e Add support for fixed strings and --less-search-pattern
Previously, if you tried to use the `-F`/`--fixed strings` option for ripgrep in
combination with the `--less-search-pattern` option, `less` would either a)
match a different pattern than intended, since it would be interpreted as a
regular expression, or b) refuse to start if it detected an invalid pattern.

This change keeps track of whether or not the `--fixed-strings` option was
passed in. If both it and the `--less-search-pattern` was passed in, a `^R`
(Control-R) control character is prepended to the search pattern. This instructs
less to *not* treat the pattern as a regular expression.
2020-01-17 11:05:06 -05:00
Harrison McCullough
cf7b33443a Add --less-search-pattern option to tell less to search for pattern
The `less` pager can search for a pattern. In addition, you can instruct it to
search for a given pattern on startup by passing in the `-p` flag followed by
the pattern to search for. Since the `batgrep` command is searching for a
pattern and invoking the pager, it has the opportunity to take advantage of this
functionality.

This patch adds a `-p` flag to `batgrep` which, in turn, passes `-p $PATTERN` to
the pager invoked. This may be specific to `less`, which is
unfortunate. However, it doesn't seem like there would be a convenient way to
make this more general. In addition, most pagers forward the actual paging to
`less` anyways.

To clarify that the behavior is specific to `less`, the long name is
`--less-search-pattern`.
2020-01-17 10:25:38 -05:00
Ethan P
eca97339e0
Fix inconsistencies in tests between tty and script 2019-12-25 00:17:01 -08:00
Ethan P
98e2077fe2
Fix lib.pager test breaking on CI 2019-12-23 18:06:27 -08:00
Ethan P
b98e241fca
Update CI environment to have script command 2019-12-23 17:49:34 -08:00
Ethan P
08acea3bf4
Add test for pager lib 2019-12-23 17:45:58 -08:00