setenv... $MANPATH

Discussion in 'Mac Apps and Mac App Store' started by shadowfax, Sep 25, 2003.

  1. shadowfax macrumors 603

    shadowfax

    Joined:
    Sep 6, 2002
    Location:
    Houston, TX
    #1
    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.
     
  2. Doctor Q Administrator

    Doctor Q

    Staff Member

    Joined:
    Sep 19, 2002
    Location:
    Los Angeles
    #2
    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 line
    Code:
    set 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:
    Code:
    set MANPATH="${MANPATH}:/my/directory:/another/directory"
     
  3. shadowfax thread starter macrumors 603

    shadowfax

    Joined:
    Sep 6, 2002
    Location:
    Houston, TX
    #3
    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...
     
  4. Doctor Q Administrator

    Doctor Q

    Staff Member

    Joined:
    Sep 19, 2002
    Location:
    Los Angeles
    #4
    File /private/etc/manpath.config has the system-wide defaults.
     
  5. szark macrumors 68030

    szark

    Joined:
    May 14, 2002
    Location:
    Arid-Zone-A
    #5
    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... ;) )
     
  6. shadowfax thread starter macrumors 603

    shadowfax

    Joined:
    Sep 6, 2002
    Location:
    Houston, TX
    #6
    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...
     
  7. shadowfax thread starter macrumors 603

    shadowfax

    Joined:
    Sep 6, 2002
    Location:
    Houston, TX
    #7
    another thing: someone mind posting the text in csh.login?
     
  8. szark macrumors 68030

    szark

    Joined:
    May 14, 2002
    Location:
    Arid-Zone-A
    #8
    Code:
    # 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:

    Code:
    # System-wide .login file for csh(1).
    
    setenv PATH "/bin:/sbin:/usr/bin:/usr/sbin"
    
    
     
  9. Doctor Q Administrator

    Doctor Q

    Staff Member

    Joined:
    Sep 19, 2002
    Location:
    Los Angeles
    #9
    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?
     
  10. szark macrumors 68030

    szark

    Joined:
    May 14, 2002
    Location:
    Arid-Zone-A
  11. shadowfax thread starter macrumors 603

    shadowfax

    Joined:
    Sep 6, 2002
    Location:
    Houston, TX
    #11
    yay, i have my man pages back yet. back to that "gay" feeling...
     
  12. szark macrumors 68030

    szark

    Joined:
    May 14, 2002
    Location:
    Arid-Zone-A
  13. Doctor Q Administrator

    Doctor Q

    Staff Member

    Joined:
    Sep 19, 2002
    Location:
    Los Angeles
    #13
    Be sure to type
    Code:
    man 'apollo 13'
    or
    Code:
    apropos 'tank top and tennis shoes at the oscars'
    for some half-witted shell jokes. Or make up your own variations!
     

Share This Page