Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make glow work with 'less --no-init' #551

Open
QuantumLibet opened this issue Dec 29, 2023 · 0 comments
Open

make glow work with 'less --no-init' #551

QuantumLibet opened this issue Dec 29, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@QuantumLibet
Copy link

Is your feature request related to a problem? Please describe.

I like my pager to not clear the screen when it exits. This allows me to use my terminals' scrollback buffer to revisit what was just displayed [in the pager].
Thus, the environment variable $PAGER is set to /usr/bin/less --no-init.

This does not work with glow.

glow does work just fine without using the paging functionality, e.g. git file.md.
But using git -p file.md to activate paging will result in:

ESC[38;5;228;48;5;63;1mESC[0mESC[38;5;228;48;5;63;1mESC[0m ESC[38;5;228;48;5;63;1m ESC[0mESC[38;5;228;48;5;63;1mMarkdown DocumentESC[0mESC[38;5;228;48;5;63;1m StructureESC[0mESC[38;5;228;48;5;63;1m ESC[0mESC[38;5;252mESC[38;5;252m ESC[0mESC[38;5;252m

Describe the solution you'd like

I wish glow and less would work together to achieve the best of both worlds: render markup files as beautifully as glow does, as well as page the contents and leave them for me to read, if I quit glow.

Basically, either offer the option to define the pager in the glow config, or integrate some pager-like behavior straight into glow, since it has to ignore the pagers' config anyways.

Additional context

  • I am fully aware that this is a usability issue, one that maybe only two people on this planet share.
  • I acknowledge that this is neither a technical problem, nor a problem of 'glow', or of 'less'.
  • The issue is caused by me, using the '--no-init' parameter with less.

Since I am struggling to find a solution to my problem, I'm raising this as a feature request, not a problem issue, in the hope, that someone has an idea on how to tackle this.
If you find this request inappropriate (or some other negative feeling), feel free to close it.

Thank you for your attention.
Have a nice day.

@QuantumLibet QuantumLibet added the enhancement New feature or request label Dec 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant