Open KSR-Yasuda opened 8 months ago
In my case, the /usr/bin/man bash >/dev/null
command shows same output in msys2 and in bare metal ArchLinux installation. Also, the output looks like warnings only.
Here is the screenshot from ArchLinux.
Thank you for checking.
I found the troff
warnings can be suppressed by man --warnings=\!w
,
but, still the grotty
warning remains...
https://lists.gnu.org/archive/html/groff/2023-07/msg00057.html#:~:text=You%20can%20arrange,to%20any%0Avalue%29%2E
This says to use env var MANROFFOPT="-c"
or GROFF_NO_SGR
, but these also do not work.
Vim's :Man
command looks trying to avoid this warning by ${GROFF_NO_SGR}
:
" /usr/share/vim/vim91/autoload/dist/man.vim (Last Change: 2023 Jun 28)
101 func dist#man#GetPage(cmdmods, ...)
(snip)
191 let env_cmd = s:env_has_u ? 'env -u MANPAGER' : 'env MANPAGER=cat'
192 let env_cmd .= ' GROFF_NO_SGR=1'
193 let man_cmd = env_cmd . ' man ' . s:GetCmdArg(sect, page)
194
195 silent exec "r !" . man_cmd
(snip)
216 endfunc
Is ${GROFF_NO_SGR}
env var actually working?
Description / Steps to reproduce the issue
With groff v1.23 package,
man
command output errors ofgrotty
andtroff
as below. It happens only for non-console output (i.e. redirected, or piped output).This had not happened with groff v1.22 or before:
Just calling
man
in bash console, it does not raise this error.However, in vim's
:Man
command (enabled with:runtime ftplugin/man.vim
line in.vimrc
), it does (probably:Man
command redirectsman
output into some file).Expected behavior
Do not show this error for non-console output.
Or is there any option or something to avoid this?
Actual behavior
As above.
Verification
Windows Version
MINGW64_NT-10.0-19045
Are you willing to submit a PR?
No response