Commit Graph

27 Commits

Author SHA1 Message Date
Ethan P.
f192b7a7d8
batman: Split short options 2023-09-19 10:46:46 -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
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
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
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
d5fa65132d
lib: Remove opt_hooks.sh and edit scripts to source lib files directly 2020-04-30 22:11:36 -07:00
Ethan P
4ee7451532
batman: Forward paging options to bat instead of handling them 2020-04-30 20:21:08 -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
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
Ethan P
5cbbbb6ebc
batman: Add support for MANPAGER environment variable 2020-02-15 15:10:18 -08:00
Ethan P
765658c23d
Fix regression caused by attempted fix of #6 2020-01-21 14:10:14 -08:00
Ethan P
c74d47ecd0
Attempt fix for #6 2020-01-21 09:57:55 -08:00
Ethan P
285ac66303
Fix missing pager arguments in batman.sh 2019-12-23 17:08:32 -08:00
Ethan P
e967497387
Update batman.sh to use the pager.sh library script 2019-12-23 16:39:33 -08:00
Ethan P
7cabaa620d
Fix batman.sh incorrectly disabling the pager 2019-12-23 16:20:28 -08:00
Ethan P
d9e34e2d5f
Add color option to batman 2019-10-22 15:35:10 -07:00
Ethan P
763d34d9c9
Fix LIB variable 2019-10-22 15:04:34 -07:00
Ethan P
3d4a0b8381
Add support for building with alternate executable names 2019-09-08 17:43:29 -07:00
Ethan P
85bb5f8bed
Added script for using bat with man 2019-09-07 15:19:12 -07:00