charmbracelet / charmbracelet/glow
glow -p not working with nvimpager
- Dominant language
- Go
- Stars
- 27.4k
- Forks
- 764
- Avg merge
- 3m
- Merged PRs (30d)
- 1
Description
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](https://github.com/charmbracelet/glow/files/9946952/test.md)
Contributor guide
Research direction
Reproduce the failure with `glow -p test.md` while `nvimpager` is set as `PAGER`, using the attached long markdown file, then compare it with `most` or `less -r`. Trace the `glow -p` pager entry point and determine why longer markdown causes exit status 1; done means long files render successfully through nvimpager without the usage error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100