Commit Graph

49 Commits

Author SHA1 Message Date
Ethan P
1fff0bcc51
lib: Add DEFAULT color to printc 2020-10-04 00:40:05 -07:00
Ethan P
fa58888298
bat-modules: Add --modules-file option 2020-07-06 18:15:01 -07:00
Ethan P
e4999a7ffb
lib: Add option parsing for short flags followed by number 2020-07-06 18:03:30 -07:00
Ethan P
38f56c1bc7
batwatch: Split hook_help into a lib script 2020-07-06 17:49:29 -07:00
Ethan P
6052d6ee17
batdiff/lib: Fix hardcoded git executable name (#35)
Thanks to @lilyball for pointing it out.
2020-06-17 17:53:20 -07:00
Ethan P
c9f3125002
*: Automatically use 'batcat' when 'bat' is missing 2020-05-12 02:31:41 -07:00
Ethan P
63101805be
lib: Fix term_width to handle cases where stty size returns '0 0' 2020-05-02 17:11:30 -07:00
Ethan P
c98e21df04
lib: Reduce size of term_width function 2020-05-02 17:03:53 -07:00
Ethan P
427baf1491
lib: Add term.sh to more accurately get terminal width 2020-05-02 16:58:17 -07:00
Ethan P
e7a394a154
lib: Use 'awk' instead of '/usr/bin/awk' 2020-05-02 14:58:33 -07:00
Ethan P
20a0058014
lib: Fix issue when pagers read an empty argument as a file 2020-05-01 23:03:59 -07:00
Ethan P
d29915f141
Revert "lib: Remove unused function in pager lib"
This reverts commit 309a2169ba.
2020-05-01 22:59:09 -07:00
Ethan P
d5fa65132d
lib: Remove opt_hooks.sh and edit scripts to source lib files directly 2020-04-30 22:11:36 -07:00
Ethan P
309a2169ba
lib: Remove unused function in pager lib 2020-04-30 20:37:17 -07:00
Ethan P
e4d790ca91
lib: Fix regression in pager library 2020-04-30 20:37:01 -07:00
Ethan P
9f983891fd
lib: Fix behavior of PAGER environment var (#24) 2020-04-30 20:13:03 -07:00
Ethan P
a31b322272
lib: Add include guard to constants.sh to lower startup time 2020-04-27 19:05:42 -07:00
Ethan P
7754406d54 *: Fix regression introduced by opt_hook_width on non-tty output 2020-04-27 18:51:36 -07:00
Ethan P
ab0f1b96d6 batdiff: Add batdiff script 2020-04-27 18:51:36 -07:00
Ethan P
7fa1faf7bf
bat-modules: Add working but work-in-progress code 2020-04-17 02:40:52 -07:00
Ethan P
9a92579100
test: Add suite for DSL parsing library 2020-04-17 02:25:33 -07:00
Ethan P
c5927f72af
bat-modules: Start work on bat-modules script 2020-04-17 01:58:59 -07:00
Ethan P
9c489732e6
lib: Add 'dsl.sh' library for parsing simple DSL 2020-04-17 01:12:11 -07:00
Ethan P
04912ff8fd
Add include for constants.sh from print.sh 2020-04-08 03:49:57 -07:00
Ethan P
03971fe64e
Split hooks into separate files to reduce compiled size 2020-04-08 03:19:58 -07:00
Ethan P
a91ee96e6a
Update scripts to use $EXECUTABLE_BAT instead of $BAT 2020-04-08 03:15:02 -07:00
Ethan P
a3d2df5927
Update all scripts to use constants, add --version support 2020-04-08 03:00:04 -07:00
Ethan P
7eac8b265d
Add tests for pager library 2020-04-06 13:01:39 -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
94ca32b0db
opt_hooks.sh: Add checks for invalid --color and --paging 2020-04-01 12:59:30 -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
Ethan P
72b09b4416
Fix pager_name to print name of unknown pagers 2020-01-17 20:50:26 -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
0309ceb054
Fix inline docs for version.sh lib 2019-09-26 15:37:11 -07:00
Ethan P
a472f1c651
Refactor common messages into functions 2019-09-25 15:59:54 -07:00
Ethan P
9c10ef4871
Refactor common options into opt hooks 2019-09-25 14:48:21 -07:00
Ethan P
6e8959b1d6
Fix $PROGRAM variable not taking the program name 2019-09-25 13:16:29 -07:00
Ethan P
e71de135e6
Add experimental pager support to batgrep 2019-09-24 12:10:17 -07:00
Ethan P
8b5d2384b2
Fix incorrect detection of --key=value arguments 2019-09-08 19:36:54 -07:00
Ethan P
469a6fc65f
Fix regression introduced in 5749d9e 2019-09-08 19:24:10 -07:00
Ethan P
3d4a0b8381
Add support for building with alternate executable names 2019-09-08 17:43:29 -07:00
Ethan P
5749d9ea2d
Fix lib/opt.sh not working on Bash 5 (#2) 2019-09-08 11:16:00 -07:00
Ethan P
b09f38190c
Updated batgrep to use the new bat 0.12 "snip" component 2019-09-06 18:05:19 -07:00
Ethan P
6f3cc53bda
Fixed libraries 2019-06-21 16:10:39 -07:00
Ethan P
248d7077f4
Initial commit. 2019-06-19 14:15:10 -07:00