diff --git a/usr.bin/man/man.sh b/usr.bin/man/man.sh index ae928a1123f7..f92dea9db844 100755 --- a/usr.bin/man/man.sh +++ b/usr.bin/man/man.sh @@ -778,26 +778,19 @@ search_path() { IFS=: for path in $PATH; do - # Do a little special casing since the base manpages - # are in /usr/share/man instead of /usr/man or /man. - case "$path" in - /bin|/usr/bin) add_to_manpath "/usr/share/man" ;; - *) if add_to_manpath "$path/man"; then - : - elif add_to_manpath "$path/MAN"; then - : - else - case "$path" in - */bin) p="${path%/bin}/man" - add_to_manpath "$p" - p="${path%/bin}/share/man" - add_to_manpath "$p" - ;; - *) ;; - esac - fi - ;; - esac + if add_to_manpath "$path/man"; then + : + elif add_to_manpath "$path/MAN"; then + : + else + case "$path" in + */bin) p="${path%/bin}/share/man" + add_to_manpath "$p" + p="${path%/bin}/man" + add_to_manpath "$p" + ;; + esac + fi done unset IFS @@ -1007,7 +1000,7 @@ SYSCTL=/sbin/sysctl debug=0 man_default_sections='1:8:2:3:n:4:5:6:7:9:l' -man_default_path='/usr/share/man:/usr/share/openssl/man:/usr/local/man' +man_default_path='/usr/share/man:/usr/share/openssl/man:/usr/local/share/man:/usr/local/man' cattool='/usr/bin/zcat -f' config_global='/etc/man.conf' diff --git a/usr.bin/man/manpath.1 b/usr.bin/man/manpath.1 index 381bef68d5de..c77ac71795b8 100644 --- a/usr.bin/man/manpath.1 +++ b/usr.bin/man/manpath.1 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 1, 2010 +.Dd March 11, 2017 .Dt MANPATH 1 .Os .Sh NAME @@ -66,15 +66,10 @@ for the first of: .Pa pathname/MAN .It If pathname ends with /bin: +.Pa pathname/../share/man +and .Pa pathname/../man .El -Note: Special logic exists to make -.Pa /bin -and -.Pa /usr/bin -look in -.Pa /usr/share/man -for manual files. .It The configuration files listed in the .Sx FILES