From af523013131a76f23a9208105fe3e851211d3b69 Mon Sep 17 00:00:00 2001 From: hjp Date: Sat, 20 Oct 2001 20:21:13 +0000 Subject: [PATCH] Added /usr/local/pgsql/man and /usr/share man to MANPATH. Build MANPATH dynamically like other PATHs. --- .zshenv | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.zshenv b/.zshenv index b8af2a3..0274914 100644 --- a/.zshenv +++ b/.zshenv @@ -77,7 +77,26 @@ if [ -r /etc/MANPATH ] then MANPATH=`cat /etc/MANPATH`:$MANPATH else - MANPATH=/usr/local/qmail/man:/usr/man:/usr/local/man:/usr/X11R6/man + ALL_PATH=/usr/local/qmail/man:/usr/man:/usr/local/man:/usr/X11R6/man:/usr/share/man:/usr/local/pgsql/man + NEW_PATH="" + + for i in ${(s/:/)ALL_PATH} + do + if test -d "$i" + then + case "$NEW_PATH" in + $i:*|*:$i|*:$i:*) ;; + *) + if test -z "$NEW_PATH" + then + NEW_PATH=$i + else + NEW_PATH=$NEW_PATH:$i + fi + esac + fi + done + MANPATH=$NEW_PATH fi export MANPATH