summaryrefslogtreecommitdiff
path: root/usr.bin/man
diff options
context:
space:
mode:
authorTijl Coosemans <tijl@FreeBSD.org>2017-03-12 10:56:19 +0000
committerTijl Coosemans <tijl@FreeBSD.org>2017-03-12 10:56:19 +0000
commit971c1c421998b70e86d0d000f285c1002d2600be (patch)
tree46f277d1afa124c4695cd6c9de42c5fca934e279 /usr.bin/man
parent2a92bd2d3881359b4968c476fb45feb6aacda879 (diff)
downloadsrc-test-971c1c421998b70e86d0d000f285c1002d2600be.tar.gz
src-test-971c1c421998b70e86d0d000f285c1002d2600be.zip
- Remove separate handling of /bin and /usr/bin in manpath. They are no
longer a special case. - Prefer PREFIX/share/man over PREFIX/man. - Add /usr/local/share/man to man_default_path. - Update manpath man page. Reviewed by: bapt
Notes
Notes: svn path=/head/; revision=315142
Diffstat (limited to 'usr.bin/man')
-rwxr-xr-xusr.bin/man/man.sh35
-rw-r--r--usr.bin/man/manpath.111
2 files changed, 17 insertions, 29 deletions
diff --git a/usr.bin/man/man.sh b/usr.bin/man/man.sh
index ae928a1123f77..f92dea9db844e 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 381bef68d5dee..c77ac71795b8d 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