summaryrefslogtreecommitdiffstats
path: root/usr.bin/man
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2015-07-24 09:10:03 +0000
committerbapt <bapt@FreeBSD.org>2015-07-24 09:10:03 +0000
commiteaa94ad7a39a6df7c6c5da4ed9faf9c1ad1b9a07 (patch)
tree2f3beca60c3a34d6efab31b2157cf3c18438bbed /usr.bin/man
parentdf41ed0ac80b22c41e5194a9baa82d4f5f96acd1 (diff)
downloadFreeBSD-src-eaa94ad7a39a6df7c6c5da4ed9faf9c1ad1b9a07.zip
FreeBSD-src-eaa94ad7a39a6df7c6c5da4ed9faf9c1ad1b9a07.tar.gz
Fix man -k with mandocdb
If apropos(1) and whatis(1) are not hardlinks to man(1) that means the system is using mandocdb, then man -k should spawn apropos(1) and/or whatis(1) directly Reported by: kevlo Tested by: kevlo Sponsored by: gandi.net
Diffstat (limited to 'usr.bin/man')
-rwxr-xr-xusr.bin/man/man.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/usr.bin/man/man.sh b/usr.bin/man/man.sh
index 5e4d767..504ca0c 100755
--- a/usr.bin/man/man.sh
+++ b/usr.bin/man/man.sh
@@ -925,6 +925,8 @@ whatis_usage() {
# Supported commands
do_apropos() {
+ [ $(stat -f %i /usr/bin/man) -eq $(stat -f %i /usr/bin/apropos) ] && \
+ exec apropos "$@"
search_whatis apropos "$@"
}
@@ -960,6 +962,8 @@ do_manpath() {
}
do_whatis() {
+ [ $(stat -f %i /usr/bin/man) -eq $(stat -f %i /usr/bin/whatis) ] && \
+ exec whatis "$@"
search_whatis whatis "$@"
}
OpenPOWER on IntegriCloud