Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Problem with man and /etc/man.conf

Hello together,

I have installed the newest version of zsh in /usr/local/zsh/...
The manpages of this version are in /usr/local/zsh/share/man/

I want 'man zsh' and 'man zshall' to search the manpage in this location so I edited '/etc/man.conf'
and added the line
MANPATH /usr/local/zsh/share/man
before the MANPATH section and the line
MANPATH_MAP /usr/local/zsh/bin /usr/local/zsh/share/man
before the MANPATH_MAP section.

It seems that this is completely ignored by Mac OS X.

'man zsh' still leads me to the manpages of the old version, 'man zshall' throws an error "Cannot open the message catalog "man" ..."

I could set MANPATH in .zshrc, but this is not the way it supposed to work.

Any suggestions to set up man correctly would be appreciated.

Best regards
Martin

to many, Mac OS X (10.5.5)

Posted on Feb 14, 2009 5:03 PM

Reply
Question marked as Best reply

Posted on Feb 14, 2009 9:01 PM

It seems /etc/man.conf is consulted only if MANPATH environment variable is not set, but in Leopard MANPATH is set in /etc/profile. Try "echo $MANPATH" in your shell:

$ echo $MANPATH
/usr/share/man:/usr/local/share/man:/usr/X11/man

/etc/profile contains a line like

eval `/usr/libexec/path_helper -s`

path_helper reads /etc/manpath and files in /etc/manpath.d/ and constructs MANPATH. /usr/share/man:/usr/local/share/man comes from /etc/manpath file, and /usr/X11/man comes from /etc/manpath.d/X11.

You can add a file for zsh in /etc/manpath.d/, but the path added by this file comes after the default path specified in /etc/manpath (i.e.,/usr/share/man:/usr/local/share/man), so 'man zsh' will still show the old man page.

You may try, for example
modify /etc/profile (not recommended)
modify /etc/manpath, or
unset MANPATH in your .zshrc (to make /etc/man.conf effective), or
set MANPATH in your .zshrc
2 replies
Question marked as Best reply

Feb 14, 2009 9:01 PM in response to macmartin

It seems /etc/man.conf is consulted only if MANPATH environment variable is not set, but in Leopard MANPATH is set in /etc/profile. Try "echo $MANPATH" in your shell:

$ echo $MANPATH
/usr/share/man:/usr/local/share/man:/usr/X11/man

/etc/profile contains a line like

eval `/usr/libexec/path_helper -s`

path_helper reads /etc/manpath and files in /etc/manpath.d/ and constructs MANPATH. /usr/share/man:/usr/local/share/man comes from /etc/manpath file, and /usr/X11/man comes from /etc/manpath.d/X11.

You can add a file for zsh in /etc/manpath.d/, but the path added by this file comes after the default path specified in /etc/manpath (i.e.,/usr/share/man:/usr/local/share/man), so 'man zsh' will still show the old man page.

You may try, for example
modify /etc/profile (not recommended)
modify /etc/manpath, or
unset MANPATH in your .zshrc (to make /etc/man.conf effective), or
set MANPATH in your .zshrc

Feb 15, 2009 1:39 AM in response to Jun T.

Thank you very much.
Actually zsh does not read /etc/profile.
Nevertheless there is a file /etc/zprofile which is executed by zsh.
I found out last night but was to tired to post this before morning.

The most simple solution is to comment out the path_helper line since I am settin up my PATH variable in a sophisticated way in ~/.zshrc

Best regrads
Martin

Problem with man and /etc/man.conf

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.