glow -p not working with nvimpager
Executing glow -p README.md returns an error only whenever nvimpager is set as the PAGER. Setting the pager to most or less -r solves the problem, but is inconvenient because nvimpager works fine for everything else.
glow -p README.md ✔ NORMAL 09:01:51 PM
Error: exit status 1
Usage:
glow [SOURCE|DIR] [flags]
glow [command]
Available Commands:
config Edit the glow config file
help Help about any command
stash Stash a markdown
Flags:
-a, --all show system files and directories (TUI-mode only)
--config string config file (default /home/luis/.config/glow/glow.yml)
-h, --help help for glow
-l, --local show local files only; no network (TUI-mode only)
-p, --pager display with pager
-s, --style string style name or JSON path (default "auto")
-v, --version version for glow
-w, --width uint word-wrap at width
Use "glow [command] --help" for more information about a command.
All markdown files over a certain length give this error. I attached an example. test.md
I found my way here when trying to understand why I couldn't get a custom theme to work by providing the path to its JSON file.
The default auto or dark settings did render colors fine though, even with nvimpager.
My problem was the custom being silently ignored. After finding this issue, I tried prefixing the glow call with PAGER=less and it worked.
I suppose until #440 is tackled there is no way to force color output and see if that allows nvimpager to render it?