


ADD(1)                    User Commands                    ADD(1)



NAME
     add - attach a filesystem, add it to your path and manpath


SYNOPSIS
     add [ options ] filesystemname filesystemname ...


DESCRIPTION
     _a_d_d is an alias provided by the  standard  Athena  dotfiles.
     It is intended to make the process of using software that is
     stored in remote filesystems  easier.   In  normal  use,  it
     requires  one argument, the name of a filesystem to _a_d_d.  In
     that  case,  it  adds  the  appropriate   binary   directory
     (arch/pmax_ul4/bin,  decmipsbin,  etc.)  to  the end of your
     command search path so that you can  find  programs  in  the
     locker,  and  adds the man directory to your MANPATH so that
     _m_a_n can find manpages that may be installed in that filesys-
     tem.  (See _l_o_c_k_e_r_s(7) for suggestions on how to organize and
     maintain lockers.)

     When no arguments are used, _a_d_d will print out the (possibly
     abbreviated)  value  of  the  user's  PATH variable. This is
     equivalent to specifying the -_v option.

     _a_d_d may also take multiple  filesystem  arguments.  In  this
     case, _a_d_d _l_o_c_k_e_r_1 _l_o_c_k_e_r_2 _l_o_c_k_e_r_3 is functionally equivalent
     to, though more efficient than, _a_d_d  _l_o_c_k_e_r_1;  _a_d_d  _l_o_c_k_e_r_2;
     _a_d_d  _l_o_c_k_e_r_3.  Thus when adding lockers to the front of your
     PATH, they will appear as _l_o_c_k_e_r_3  _l_o_c_k_e_r_2  _l_o_c_k_e_r_1  at  the
     front of your PATH.

     _a_d_d may be used interactively while logged in,  or  in  your
     ~/.environment file.

     Typing "alias add" will reveal that it  is  an  alias  which
     sources the csh script /_u_s_r/_a_t_h_e_n_a/_l_i_b/_i_n_i_t/_a_d_d.


OPTIONS
     _a_d_d accepts the following options:

     -f        _a_d_d normally adds lockers to the end of your path.
              This  option  causes it to add lockers to the front
              of your path instead. This is useful when you  want
              to  cause  programs  in the lockers to replace pro-
              grams found in other places, such as on the  system
              packs. You usually want lockers added to the end of
              your path, however, to prevent the  possibility  of
              locker  maintainers  replacing  important  binaries
              with things you don't expect.




MIT Athena        Last change: 1 December 1994                  1






ADD(1)                    User Commands                    ADD(1)



     -w        This option causes _a_d_d to warn you in the event  a
              locker  you have asked to be added does not support
              your platform. A binary directory will not be added
              to your PATH, but if a man directory exists it will
              still be added to your MANPATH. _a_d_d  normally  says
              nothing in this case.

     -d        This option causes _a_d_d to generate debugging  out-
              put  relating  to  the  changes it is making to the
              user's PATH and MANPATH.

     -v
     -v0
              By default, -_v causes _a_d_d to display the output  of
              attach  for the user, which is normally suppressed.
              It also, by  default,  turns  on  debugging  output
              (above).  If  _a_d_d is running in _n_e_w mode, debugging
              is not turned on (see -_n below). -_v_0 never turns on
              debugging output.

              Verbose mode works by invoking _a_t_t_a_c_h twice -  once
              for  output to the user, and once for output to _a_d_d
              itself to find out where the locker is mounted.

     -n        This option specifies that _a_d_d should  not  engage
              in potentially disagreeable backwards-compatibility
              behavior. Specifically, it causes the -_v option  to
              not turn on debugging output.

     -p        This option causes _a_d_d to print  the  contents  of
              the  user's  PATH. In the case where a path element
              is of the form /mit/foo/arch/pmax_ul4/bin, _a_d_d sub-
              stitutes  the  string  {add foo} for that path ele-
              ment. This serves to shorten and make more readable
              the user's PATH.

     -e        This option is used for supporting the use of  _a_d_d
              in  the  user's  ~/.environment file. The user need
              never specify this option as that is taken care  of
              by a special version of the alias that is in effect
              when the .environment  file  is  run.  This  option
              causes   _a_d_d   to   modify   the   shell  variables
              _a_t_h_e_n_a__p_a_t_h  and  _a_t_h_e_n_a__m_a_n_p_a_t_h  instead  of   the
              environment  variables  PATH and MANPATH as it nor-
              mally does.

     -a        This option  causes  _a_d_d  to  pass  all  remaining
              options  on  the  command  line directly to _a_t_t_a_c_h.
              This is useful for passing flags meant to be inter-
              preted by _a_t_t_a_c_h and not by _a_d_d.





MIT Athena        Last change: 1 December 1994                  2






ADD(1)                    User Commands                    ADD(1)



VARIABLES
     The shell variable _a_d_d__f_l_a_g_s may be set to  specify  default
     flags  that  _a_d_d  is  intended  to use for all commands. For
     example, if you desire that attach  always  be  verbose  and
     give  warnings  for  lockers  that do not have binary direc-
     tories supporting your  platform,  you  might  put  a  ``set
     add_flags = "-v -w"'' in your ~/.cshrc.mine file.


FILES
     /usr/athena/lib/init/cshrc     global  Athena   cshrc   file
     /usr/athena/lib/init/add      the script the add alias calls
     ~/.cshrc                      user's cshrc file


SEE ALSO
     attach(1), man(1), csh(1), lockers(7)


BUGS
     ``_a_d_d -a -v foo'' and other similar commands  attempting  to
     modify  the  output  behaviour of _a_t_t_a_c_h directly will cause
     _a_d_d to fail.  Such options will override  the  -p  that  _a_d_d
     passes  to  _a_t_t_a_c_h.  This is because _a_d_d does not attempt to
     insert the -p between _a_t_t_a_c_h's  flags  and  lockernames;  it
     places it first.

     Since _a_d_d does  not  parse  the  arguments  to  _a_t_t_a_c_h,  and
     because _a_t_t_a_c_h may return ambiguous error codes (in the case
     of attempting to attach multiple  lockers),  _a_d_d's  behavior
     may  be suboptimal in certain situations. For example, ``_a_d_d
     -v sdjfb'' will invoke _a_t_t_a_c_h twice, even though  the  first
     time returned an error, because it doesn't know any better.






















MIT Athena        Last change: 1 December 1994                  3



