commit cae3e4c174ea217f7c373ad9c918599c7edce3e3 parent 3825eff01f580a58cdd45cda011079e4511a51e5 Author: Jacob R. Edwards <jacob@jacobedwards.org> Date: Sun, 14 May 2023 10:56:11 -0700 Update man wrapper script I removed the plan9port man(1) fallback because I figure you may aswell just invoke '9 man' if you want a plan9port manual. Diffstat:
| M | local/bin/bin/man | | | 18 | ++++++------------ |
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/local/bin/bin/man b/local/bin/bin/man @@ -1,15 +1,9 @@ #!/bin/ksh -# Copyright 2021 Jacob R. Edwards -# License: GPLv3 -# Unix and Plan9 man +# Copyright 2021, 2023 Jacob R. Edwards +# man wrapper # -# Since mandoc(1) doesn't properly render all plan9port manuals -# $PLAN9/man cannot simply be added to the search path and something -# like this must be done. +# Currently it just removes annoying escape sequences and prevents +# man(1) from invoking a pager. I have man output in ASCII because +# UTF-8 caused issues when combined with col(1) -b sometimes. -set -o pipefail - -9man() { 9 man "$@" | sed 's/^ //'; } -uman() { "$(whereis man)" -ca "$@" | col -b; } - -uman "$@" 2>/dev/null || 9man "$@" +"$(whereis man)" -T ascii -ca "$@" | col -b