PDA

View Full Version : setenv... $MANPATH




shadowfax
Sep 25, 2003, 10:08 PM
hey, could someone give me a rundown on how to reset the file that has my manpath on it... you know, the commands, the location of the default manpath, and the name of the file i need to be editing? i screwed it up unwittingly a few weeks ago and can't remember where anything is. thanks.



Doctor Q
Sep 25, 2003, 10:40 PM
I'm reading up on it. The man command uses the manpath command to set the MANPATH environment variable. But you can set MANPATH yourself too. Other Unix varieties allow MANPATH to contain a colon-separated list of directories, and I assume Darwin is the same.

Are you using tcsh? I added the lineset MANPATH=`manpath` to ~/.tcshrc to initialize MANPATH, although you'd get this value anyway by default. The advantage is that you can add other directories to your MANPATH by adding an additional line like this:set MANPATH="${MANPATH}:/my/directory:/another/directory"

shadowfax
Sep 26, 2003, 12:37 AM
yeah, my manpath was screwed in the actual default initializing file for tcsh... i can't remember where it is or i would be able to fix it...

Doctor Q
Sep 26, 2003, 12:59 AM
File /private/etc/manpath.config has the system-wide defaults.

szark
Sep 26, 2003, 01:00 AM
Originally posted by shadowfax
yeah, my manpath was screwed in the actual default initializing file for tcsh... i can't remember where it is or i would be able to fix it...

Well, he told you where it should be:

~/.tcshrc (or ~/.cshrc)

which is the same as:

/Users/<your_user_name>/.tcshrc

(or /Users/<your_user_name>/.cshrc)


The files are hidden, so they won't show up in the Finder.

...unless you meant the system-wide init files, which are:

/etc/csh.cshrc
/etc/csh.login
/etc/manpath.config

(Heh -- Doctor Q beat me to the reply -- gotta type faster... ;) )

shadowfax
Sep 26, 2003, 01:03 AM
Originally posted by szark
/etc/csh.cshrc
/etc/csh.login
/etc/manpath.config

(Heh -- Doctor Q beat me to the reply -- gotta type faster... ;) )

i was actually looking for the first two you mentioned, so thanks.

to both of you. i love this site for little junk like this :)

i really should RTFM though--except it's kind of hard when your man command doesn't bring anything up for gcc...

shadowfax
Sep 26, 2003, 01:07 AM
another thing: someone mind posting the text in csh.login?

szark
Sep 26, 2003, 01:14 AM
# System-wide .login file for csh(1).

setenv PATH "/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin"



If you don't have X11 installed:

# System-wide .login file for csh(1).

setenv PATH "/bin:/sbin:/usr/bin:/usr/sbin"

Doctor Q
Sep 26, 2003, 01:15 AM
I purposely waited so szark could answer that one. I don't want to hog all the fun.

Why read manuals when you have friends?

szark
Sep 26, 2003, 01:17 AM
Thanks. :D

I've still gotta type faster.

shadowfax
Sep 26, 2003, 01:25 AM
yay, i have my man pages back yet. back to that "gay" feeling...

szark
Sep 26, 2003, 01:28 AM
Glad we could help!

Doctor Q
Sep 26, 2003, 01:54 AM
Be sure to type man 'apollo 13'orapropos 'tank top and tennis shoes at the oscars' for some half-witted shell jokes. Or make up your own variations!