Date: Wed, 30 Oct 2024 04:30:50 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 282414] man calls pager even when stdout is not a TTY Message-ID: <bug-282414-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D282414 Bug ID: 282414 Summary: man calls pager even when stdout is not a TTY Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: aclopte@gmail.com Vim or Neovim can act as man pagers PAGER=3D'vim -' man man PAGER=3D'nvim +Man!' man man however it breaks when stdout is not a TTY (e.g. when adding "| cat" to abo= ve command). This breakage surfaces in applications such as shells and editors that want to display the output of "man" (or "apropos" which uses the same script) somewhere that's not the entire terminal. This could be fixed by either: 1. having Neovim behave like cat when stdout is not a TTY 2. or making man not call $PAGER in this case (or I guess use "cat" to simp= lify implementation) I think option 2 makes sense because the pager is unnecessary here. Also man already behaves differently if stdout is not a TTY (it doesn't add ANSI esc= ape codes for bold fonts etc). This is also what [man-db](https://gitlab.com/man-db/man-db) does. Probably needs to be changed in https://cgit.freebsd.org/src/tree/usr.bin/man/man.sh Originally reported as https://github.com/fish-shell/fish-shell/issues/10820 --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-282414-227>