From 782421ef0701c2d9031bcbdbae3abad17cc142e1 Mon Sep 17 00:00:00 2001 From: Tony Duckles Date: Sun, 4 Feb 2018 16:13:11 -0600 Subject: [PATCH] .bashrc: Make sure $MANPATH has some sane defaults --- .bashrc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.bashrc b/.bashrc index 0510135..a8ca558 100644 --- a/.bashrc +++ b/.bashrc @@ -65,6 +65,10 @@ umask 0022 # PATH # ---------------------------------------------------------------------- +# make sure $MANPATH has some sane defaults +: ${MANPATH="/usr/share/man"} +test -d "/usr/share/man" && MANPATH="/usr/share/man:$MANPATH" + # include the various sbin's along with /usr/local/bin PATH="$PATH:/usr/local/sbin:/usr/sbin:/sbin" PATH="/usr/local/bin:$PATH" @@ -75,12 +79,16 @@ test -d "$HOME/sbin" && PATH="$HOME/sbin:$PATH" # SmartOS pkgin test -d "/opt/local" && PATH="/opt/local/sbin:/opt/local/bin:$PATH" +test -d "/opt/local/man" && MANPATH="/opt/local/man:$MANPATH" # SmartOS local files test -d "/opt/custom" && PATH="/opt/custom/sbin:/opt/custom/bin:$PATH" +test -d "/opt/custom/man" && MANPATH="/opt/custom/man:$MANPATH" # SmartOS SDC test -d "/smartdc" && PATH="/smartdc/bin:/opt/smartdc/bin:/opt/smartdc/agents/bin:$PATH" +test -d "/smartdc/man" && MANPATH="/smartdc/man:$MANPATH" # SmartOS native binaries, for OS/LX zones test -d "/native" && PATH="$PATH:/native/usr/sbin:/native/usr/bin:/native/sbin:/native/bin" +test -d "/native/usr/share/man" && MANPATH="$MANPATH:/native/usr/share/man" # RVM test -d "$HOME/.rvm/bin" && PATH="$PATH:$HOME/.rvm/bin" @@ -238,9 +246,6 @@ if [ "$UNAME" = SunOS ]; then test -x /usr/gnu/bin/grep && alias grep="/usr/gnu/bin/grep" test -x /usr/gnu/bin/sed && alias sed="/usr/gnu/bin/sed" test -x /usr/gnu/bin/awk && alias awk="/usr/gnu/bin/awk" - - # setup MANPATH - MANPATH="/usr/share/man:/smartdc/man:/opt/smartdc/man:/opt/local/man:/opt/custom/man:$MANPATH" fi # ---------------------------------------------------------------------- -- 2.45.2