From 3d7263ff67534b5d533c1d78eca8d648b72bca93 Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Mon, 2 Apr 2001 13:04:04 +0000 Subject: after-move cleanup --- Functions/Misc/mere | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 Functions/Misc/mere (limited to 'Functions/Misc/mere') diff --git a/Functions/Misc/mere b/Functions/Misc/mere new file mode 100644 index 000000000..a9beb2c10 --- /dev/null +++ b/Functions/Misc/mere @@ -0,0 +1,83 @@ +# read a man page + +setopt localoptions extendedglob + +local manual="$1" col=col terminal=man magic line + +# /usr/bin/col on SunOS 4 doesn't support -x. +if [[ -x /usr/5bin/col ]]; then + col=/usr/5bin/col; +fi + +# SunOS 5 has no `man' terminal. +if [[ -d /usr/share/lib/nterm && + ! -e /usr/share/lib/nterm/tab.$terminal ]]; then + terminal=lp; +fi + +# HP-UX has no `man' terminal. +if [[ -d /usr/share/lib/term && + ! -e /usr/share/lib/term/tab$terminal ]]; then + terminal=lp; +fi + +# Unixware has no `man' terminal. +if [[ -d /usr/ucblib/doctools/nterm && + ! -e /usr/ucblib/doctools/nterm/tab.$terminal ]]; then + terminal=lp; +fi + +# Solaris has SGML manuals. +if [[ -f /usr/lib/sgml/sgml2roff ]] && + [[ "$(read -er < $manual)" = "