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

Feature Request: 'raw' mode (similar to less -r #265

Closed
ttelford opened this issue Jan 23, 2025 · 2 comments
Closed

Feature Request: 'raw' mode (similar to less -r #265

ttelford opened this issue Jan 23, 2025 · 2 comments

Comments

@ttelford
Copy link

less has an -r (raw) mode.

This mode is (depending on the implementation of less) even discouraged from use - however it can be quite useful for some modes where those raw characters (or encodings) are supported by the terminal and the pager (less or in this case, moar) doesn't and probably shouldn't be expected to support it directly.

Case in point: the output of gpg --list-keys can, if configured appropriately, output the PhotoID that's embedded in the OpenPGP keys. Many modern terminals (and many very old ones) support graphical modes, such as:

I'm not suggesting that moar support any of these, but it would be nice if moar could have a 'raw' passthrough mode, similar to less -r which allows at least some of these (such as sixels) to work in supported terminals.

@walles
Copy link
Owner

walles commented Jan 25, 2025

No, sorry.

I want moar to be predictable, and this option would make moar not predictable.

To do its job, moar needs to know:

  • How many lines to print on the screen
  • How long each line is

If text lines magically, without moar's knowledge, end up as images, it will be impossible for moar to know either of these.

To quote less's man page (this would go for moar as well):

when the -r option is used, less cannot keep track of the actual appearance of the screen (since this depends on how the screen responds to each type of control character). Thus, various display problems may result, such as long lines being split in the wrong place.

@walles
Copy link
Owner

walles commented Jan 25, 2025

If you have any further questions / opinions here do ask and I'll answer to the best of my abilities!

@walles walles closed this as completed Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants