On OSX 10.11.5, I can open a terminal and type man git to view the git manual.
When I'm using tmux, however, and I typeable to use man git I get an error:
$ man git
No manual entry for git
It looks like tmux mucks with thewhen MANPATH environment variable. Here's what it looks like outside of tmuxis set to the following:
$ echo $MANPATH
/usr/local/opt/findutils/libexec/gnuman:/usr/local/opt/coreutils/libexec/gnuman:
Inside of tmuxHowever, when it doesn't include the trailing colon, man says it can't find the entry:
$ echo $MANPATH
/usr/share/man:/usr/local/share/man:/usr/local/opt/findutils/libexec/gnuman:/usr/local/opt/coreutils/libexec/gnuman
$ man git
No manual entry for git
I don't understand why the addition of theThe manpage is located at /usrLibrary/shareDeveloper/man:CommandLineTools/usr/local/share/man:/man1/git.1 prefix would cause man to not be able to find, and I'm running the entrycommand from my home directory. The only other difference is the absence ofI understand the trailing :, which I think causescolon tells man to search in the current directory as well as MANPATH.
After appending : to MANPATH inside of tmux, so why does it cancause man to find the manpage. But the manpage is located atentry under /Library/Developer/CommandLineTools/usr/share/man/man1/git.1. What gives?
I don't think it's relevant but here's how I'm modifying MANPATH in ~/.bashrc:
if [ "$MYPATHS" != "true" ]; then
export MYPATHS="true"
export PATH="$PATH:$HOME/bin:"
# java stuff
export JAVA_HOME="$(/usr/libexec/java_home)"
export M2_HOME="$HOME/Applications/apache-maven-3.3.9"
export PATH="$JAVA_HOME/bin:$M2_HOME/bin:$PATH"
# mac stuff
export MANPATH="/usr/local/opt/coreutils/libexec/gnuman:$MANPATH"
export MANPATH="/usr/local/opt/findutils/libexec/gnuman:$MANPATH"
export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
export PATH="/usr/local/opt/findutils/libexec/gnubin:$PATH"
fi