Closed aeosynth closed 3 years ago
You should be able to accomplish this by setting the PAGER
environment variable or by using the -pager
flag.
IE, these are all equivalent
$ trans es:en hola | less -R
$ PAGER="less -R" trans -v es:en hola
$ trans -v -pager "less -R" es:en hola
This issue is about improving the -v
option so that we don't have to worry about specifying less -R
.
Okay that's fair. I'm not a contributor on this project and I don't know what your specific use-case is, so I don't want to assume too much. For my use-case, I'm pretty happy with exporting the LESS
and PAGER
environment variables in my ~/.zshrc
file as it allows me to use less
in a color-friendly manner, regardless of the application calling it.
$ env | grep -e LESS -e PAGER
PAGER=less
LESS=-R
Good luck, hopefully your use-case can be addressed by one of the developers soon.
Thanks a lot for the suggestion!
less
needs the-R
/--RAW-CONTROL-CHARS
option to display ansi escape codes correctly (the lowercase-r
options display all escape codes and can confuseless
). i'd like to use trans'-v
option instead of manually piping intoless -R
.