most
most copied to clipboard
No color after commit `95dedab`
Hello,
When I compile most
on the commit https://github.com/jedsoft/most/commit/95dedabe9c6b9ab05e61f718bec03ff2b0e8f09a, there is no color.
Command env PAGER=most man ls
:
And this is with its parent commit https://github.com/jedsoft/most/commit/c9cfad50a4158827832065dae6d735c676118d22, colors are working correctly:
In both cases, its using the same variable environments, and TERM
is set to xterm-256color
Please let me know if you need more informations
I am unable to reproduce this. Please provide the output of:
most --version 2>&1 | head
your terminal program and version, the values of the TERM and COLORTERM environment variables, as well as your OS, and if it is 32 or 64 bit.
Thanks, --John
most --version 2>&1 | head
MOST version pre5.2-7 (S-Lang version pre2.3.3-75)
Usage:
most [-1Cbcdkrstvw] [+/string] [+line number] [+s] [+d] file...
where: -1: assume VT100 terminal. (VMS only)
-b: Startup in binary mode.
-C: disable color support
-c: Make searches case sensitive.
-d: Do not display the \ wrap marker when wrapping lines.
-M: Do not attempt to mmap files.
-r: Default to regexp search
I've tested on different terminals and OS, with the same result, no color:
- alacritty 0.10.1
- xfce4-terminal 1.0.4
- GNOME Terminal 3.44.1 using VTE 0.68.0 +BIDI +GNUTLS +ICU +SYSTEMD
OS:
- Fedora 35
- Clearlinux 36510
The OS are 64 bits
COLORTERM=truecolor
TERM=xterm-256color
With most version pre5.2-6
, colors are working correctly
What happens if you unset the COLORTERM environment variable? Does upgrading to the latest version (pre5.2-9) help?
Thanks
On Sat, 18 Jun 2022 11:49:07 -0700, Sebastien Chapuis @.***> said:
most --version 2>&1 | head
MOST version pre5.2-7 (S-Lang version pre2.3.3-75) Usage: most [-1Cbcdkrstvw] [+/string] [+line number] [+s] [+d] file... where: -1: assume VT100 terminal. (VMS only) -b: Startup in binary mode. -C: disable color support -c: Make searches case sensitive. -d: Do not display the \ wrap marker when wrapping lines. -M: Do not attempt to mmap files. -r: Default to regexp search
I've tested on different terminals and OS, with the same result, no color:
- alacritty 0.10.1
- xfce4-terminal 1.0.4
- GNOME Terminal 3.44.1 using VTE 0.68.0 +BIDI +GNUTLS +ICU +SYSTEMD
OS:
- Fedora 35
- Clearlinux 36510
The OS are 64 bits
COLORTERM=truecolor TERM=xterm-256color
With most version
pre5.2-6
, colors are working correctly-- Reply to this email directly or view it on GitHub: https://github.com/jedsoft/most/issues/9#issuecomment-1159536019 You are receiving this because you commented.
Message ID: @.***>
Unsetting COLORTERM
has no effect, there is still no color.
And it's the same result with version pre-5.2.9 (https://github.com/jedsoft/most/commit/0ab81d64713da4b9193d2c90411a16e5ba238613)
Please try this with pre5.2.0-9:
cd /path/to/most/src
make clean && make
script
./objs/most ../testfiles/truecolor.txt
(take a screenshot and exit back to shell)
exit
This will produce a file called `typescript'. I would appreciate it you send it and the screenshot to me. Thanks
Alright, I tested that with pre5.2.0-9.
The screenshot, it seems that colors are correct here ?
And the file. typescript.tar.gz
I've also produce another typescript
file with the following commands, not sure if it helps:
cd /path/to/most/src
make clean && make
script
env PAGER=./objs/most man ls
exit
It is with that command that there is no color.
From you screenshot, your terminal supports truecolor and most has correctly interpreted the escape sequence in the test file. The question is what does most see when man is used. Please try the following:
env PAGER=/bin/cat man ls > /tmp/ls.txt
Please send /tmp/ls.txt to me. Also, have you tried omitting "env" and just use
PAGER=./objs/most man ls
? Thanks
Please send /tmp/ls.txt to me. Also, have you tried omitting "env" and just use PAGER=./objs/most man ls
I've tried yes, and also:
man --pager=./objs/most ls
They both show no colors
There are no color escape sequences in the ls.txt file. This is why most does not display color. It seems to me that the problem you are experiencing is external to most.
This is strange that on version pre5.2-6, colors are displayed without any modification to the environment or to man
itself.
On pre5.2.0-9, when I run most in binary mode, or with displaying controls characters, I can see the escapes sequences:
env PAGER="./src/objs/most -b" man ls
env PAGER="./src/objs/most -v" man ls
Evidently man strips the highlighting sequences when stdout is redirected unless the MAN_KEEP_FORMATTING environment variable is defined. That is, produce the ls.txt file using:
MAN_KEEP_FORMATTING=1 man ls > /tmp/ls.txt
Thanks