Commit Graph

133 Commits

Author SHA1 Message Date
Ethan P.
f192b7a7d8
batman: Split short options 2023-09-19 10:46:46 -07:00
Ethan P.
c29dfb136a
batdiff: Show error when not in git repo
This is instead of allowing `git` to dump its own warning to the
console.
2023-09-13 11:53:49 -07:00
Ethan P.
2e1e768559
batdiff: Support filtering diffs by directory
This brings parity between using `delta` and `bat --diff`.
Previously, only `delta` supported this use case.
2023-09-13 11:15:20 -07:00
Ethan P.
4039859b62
batdiff: Check delta version for --hunk-style
This adds compatibility for older `delta` versions.
2023-09-13 11:06:11 -07:00
Bill Mill
c26f22c768 fix typos in batgrep help 2023-09-13 10:41:31 -07:00
Ethan P.
ba984f470e
Merge branch 'master' into compressed-tar 2023-09-13 10:33:26 -07:00
David Gus Shields
162c21d012 readd exa conditionally 2023-09-13 10:29:14 -07:00
David Gus Shields
d96fc92165 change all references to exa to eza 2023-09-13 10:29:14 -07:00
Adam Spiers
85aaf4875d batpipe: Add support for gzipped and bzipped tar files
This adds support for *.{tgz,tar.gz,tbz,tar.bz2} files.
2023-08-03 17:01:26 +01:00
Adam Spiers
4c220a84a3 batpipe: Extract batpipe_archive_header() helper function 2023-08-03 16:49:53 +01:00
Bill Mill
762ac557f4 use hook_help 2023-06-15 16:54:45 -07:00
Bill Mill
15876936ed add --help to batgrep 2023-06-15 16:54:45 -07:00
Ethan P
7aa73f8989
batdiff: Add '--staged' flag 2023-05-15 20:31:48 -07:00
Ethan P
14f36f51b7
batman: Use self as MANPAGER
With certain implementations of `man`, the pager is called with execve
and naiive argument splitting instead of going through the shell.

This change uses the script as the pager itself, working around
the issue.
2023-05-15 19:03:00 -07:00
Ethan P
e609d1a2c5
prettybat: Fix short flags passed to bat
Fixes #87.
2023-03-24 11:01:56 -07:00
Ethan P
97006f0f09
batman: Allow spaces in manual sections 2023-03-21 01:58:48 -07:00
Ethan P
287398acbc
batman: Fix parsing manual pages in fzf preview 2023-03-21 01:58:48 -07:00
Ethan P
e53db161a7
batman: Only parse first manpage when selected 2023-03-21 01:58:48 -07:00
Ethan P
f07a22d536
batpipe: Fix SELF variable being wrong when compressed 2023-03-21 01:58:48 -07:00
Ethan P
ea604457ea
batpipe: Add BATPIPE_TERM_WIDTH 2023-03-21 01:58:47 -07:00
Ethan P
998e2ff1a9
batpipe: Fix opened-in-less detection 2023-03-21 01:58:47 -07:00
Eoin Mcloughlin
e9daffde45 Fix bug where some man pages would fail to open
Some man page sections contain alphabetical characters (e.g. 3bsd,
3perl, 3ssl.) This fixes a bug where selection of such pages would
not open any man page.
2023-03-20 22:45:15 -07:00
Trevor Leibert
20cc74e8b4 batman: Fix error when using fzf to pick manpages
- steps to reproduce error:
  - run batman with no arguments
  - pick any entry
  - script exits and man prints an error message similar to 'No manual entry for .k5identity  in section 5'

I speculated that this error was due to whitespace being attached to the second argument in the man call.
This commit fixes this error by piping the second argument through xargs to strip these spaces.

After applying this commit the script works as expected.
2022-07-21 19:37:56 -07:00
MithicSpirit
33c2c195dc batdiff: Fix line too long (>80 chars) 2022-07-21 19:37:08 -07:00
MithicSpirit
462df32d4c batdiff: Fix use of deprecated --hunk-style
Delta has deprecated --hunk-style in favor of its synonym
--hunk-header-decoration-style. See
https://github.com/dandavison/delta/releases/tag/0.12.0
2022-07-21 19:37:08 -07:00
Robert Irelan
69792e95da batgrep: handle -u flag to ripgrep 2022-07-21 19:35:55 -07:00
Konstantin Mikhailov
8ad00bd978 batgrep: add flag to disable separators between files 2021-08-29 13:49:25 -07:00
Ethan P
7803ecaba1
batpipe: Fix colors not showing up inside less 2021-08-21 16:19:17 -07:00
Ethan P
33e0c168e0
batgrep: Add support for '--' 2021-08-21 15:48:14 -07:00
Ethan P
82ac5c4391
batman: If fzf is installed, use batman to search through man pages 2021-08-21 15:22:29 -07:00
Ethan P
f280553fb1
batman: Only set grid style if BAT_STYLE is not defined 2021-08-21 15:19:14 -07:00
Ethan P
d989b0bfde
batwatch: Buffer to reduce flickering from redraw 2021-08-11 01:15:46 -07:00
Ethan P
75d66fa352
batpipe: Fix incorrect colors in usage instructions 2021-04-10 12:31:52 -07:00
Ethan P
cae57be87b
batgrep: Respect the BAT_STYLE environment variable (#54) 2021-04-09 01:12:36 -07:00
Ethan P
a526c7927b
batgrep: Fix to work with rg 11 (#53) 2021-04-08 14:17:13 -07:00
Ethan P
54db67408e
prettybat: Add support for SVG formatting using prettier 2021-04-06 15:57:54 -07:00
Ethan P
860638715a
prettybat: Allow reading from pipe (#51) 2021-04-06 15:45:30 -07:00
Ethan P
6497bc04a0
batpipe: Change the install commands to enable color automatically 2021-04-04 14:22:39 -07:00
Ethan P
672b4814ec
batpipe: Fix incorrect bash install commands 2021-04-04 14:20:11 -07:00
Ethan P
2aff613888
batpipe: Format compressed files with 'bat' 2021-04-04 14:14:16 -07:00
Ethan P
82b444f93b
batpipe: Replace 'bat_if_not_bat' with a smarter 'bat' function 2021-04-04 14:13:16 -07:00
Ethan P
27c68692f1
batwatch: Show the watched command in bat's header 2021-04-02 16:32:02 -07:00
Ethan P
70c7509343
batwatch: Disable bat's pager (#23) 2021-04-02 16:26:45 -07:00
Ethan P
164142dd43
batwatch: Add mode for watching command output 2021-04-02 16:17:07 -07:00
Ethan P
5f5a5e87a9
batpipe: Highlight unsupported files using bat 2021-03-30 19:25:51 -07:00
Ethan P
5708706436
batpipe: Fix error when external viewers folder exists 2021-03-30 18:51:34 -07:00
Ethan P
2b2db2b506
batpipe: Add support for exa 2021-03-24 20:23:58 -07:00
Ethan P
dafd2addc0
batpipe: Add support for *.xz files 2021-03-24 20:13:27 -07:00
Ethan P
0d2e999b2a
batpipe: Fix viewing listings in zip files 2021-03-24 20:09:04 -07:00
Ethan P
988780bce9
batpipe: Add support for *.gz files 2021-03-24 20:08:16 -07:00