Use -R instead of -r for fallback pager command#5759
Use -R instead of -r for fallback pager command#5759danielbachhuber merged 1 commit intowp-cli:mainfrom
Conversation
Not all versions of less offer -r as seen in wp-cli#5758 Also, modern versions of LESS have the following warning when viewing man pages: "USE OF THE -r OPTION IS NOT RECOMMENDED." -R or --RAW-CONTROL-CHARS is defined as: Like -r, but only ANSI "color" escape sequences and OSC 8 hyperlink sequences are output in "raw" form. Fixes wp-cli#5758
danielbachhuber
left a comment
There was a problem hiding this comment.
Do you know (or can you track down) when -R was introduced?
I have a slight backwards compat concern with this change, although it wouldn't be a huge detail because wp help is user-initated. I would feel more comfortable if we knew when -R was introduced, and which version of less was included on some major distros.
|
According to git blame of https://github.com/gwsw/less/blame/f229eab7eda5f31670b9ac2dd327fb148765e420/less.nro.VER#L979 it was around 17 years ago : ) |
|
Out of interest was able to track it back to https://www.greenwoodsoftware.com/less/news.346.html so it is available as of 5 Nov 1999: |
|
@mrsdizzie Great, thanks for doing that discovery. It looks like there wasn't any discussion around |
Not all versions of less offer
-ras seen in #5758Also, modern versions of LESS have the following warning when viewing man pages:
From
man lessReference: https://man7.org/linux/man-pages/man1/less.1.html
Fixes #5758