source: trunk/packs/dotfiles/add.1 @ 8535

Revision 8535, 6.2 KB checked in by cfields, 28 years ago (diff)
Remove -m doc. Update -f doc. Not exactly pretty.
Line 
1.TH ADD 1 "1 December 1994"
2.ds ]W MIT Athena
3.SH NAME
4add - attach a filesystem, add it to your path and manpath
5
6.SH SYNOPSIS
7add [ options ] filesystemname filesystemname ...
8
9.SH DESCRIPTION
10\fIadd\fR is an alias provided by the standard Athena dotfiles.  It is
11intended to make the process of using software that is stored in
12remote filesystems easier.  In normal use, it requires one argument,
13the name of a filesystem to \fIadd\fR.  In that case, it adds the
14appropriate binary directory (arch/pmax_ul4/bin, decmipsbin, etc.) to
15the end of your command search path so that you can find programs in
16the locker, and adds the man directory to your MANPATH so that
17\fIman\fR can find manpages that may be installed in that filesystem.
18(See \fIlockers\fR(7) for suggestions on how to organize and maintain
19lockers.)
20
21When no arguments are used, \fIadd\fR will print out the (possibly
22abbreviated) value of the user's PATH variable. This is equivalent to
23specifying the \fI-v\fR option.
24
25\fIadd\fR may also take multiple filesystem arguments. In this case,
26\fIadd locker1 locker2 locker3\fR is functionally equivalent to,
27though more efficient than, \fIadd locker1; add locker2; add
28locker3\fR. Thus when adding lockers to the front of your PATH, they
29will appear as \fIlocker3 locker2 locker1\fR at the front of your
30PATH.
31
32\fIadd\fR may be used interactively while logged in, or in your
33~/.environment file.
34
35Typing "alias add" will reveal that it is an alias which sources the
36csh script \fI/usr/athena/lib/init/add\fR.
37
38.SH OPTIONS
39\fIadd\fR accepts the following options:
40.TP 9
41.B \-f
42\fIadd\fR normally adds lockers to the end of your path. This option
43causes it to add lockers to the front of your path instead. If the
44locker is already in your path but not at the front, it will be moved
45there. However, when -f is used in your ~/.environment file, it does
46not affect lockers already in your path.
47
48This is feature useful when you want to cause programs in the lockers
49to replace programs found in other places, such as on the system
50packs. You usually want lockers added to the end of your path,
51however, to prevent the possibility of locker maintainers replacing
52important binaries with things you don't expect.
53.TP 9
54.B \-r
55This option causes \fIadd\fR to remove the specified lockers from your
56path. This option has no effect when used in your ~/.environment file.
57.TP 9
58.B \-w
59This option causes \fIadd\fR to warn you in the event a locker you have
60asked to be added does not support your platform. A binary directory
61will not be added to your PATH, but if a man directory exists it will
62still be added to your MANPATH. \fIadd\fR normally says nothing in this
63case.
64.TP 9
65.B \-d
66This option causes \fIadd\fR to generate debugging output relating to
67the changes it is making to the user's PATH and MANPATH.
68.TP
69.B \-v
70.br
71.ns
72.HP 9
73.B \-v0
74.br
75By default, \fI-v\fR causes \fIadd\fR to display the output of attach
76for the user, which is normally suppressed. It also, by default, turns
77on debugging output (above). If \fIadd\fR is running in \fInew\fR mode,
78debugging is not turned on (see \fI-n\fR below). \fI-v0\fR never turns
79on debugging output.
80
81Verbose mode works by invoking \fIattach\fR twice - once for output to the
82user, and once for output to \fIadd\fR itself to find out where the
83locker is mounted.
84.TP 9
85.B \-n
86This option specifies that \fIadd\fR should not engage in potentially
87disagreeable backwards-compatibility behavior. Specifically, it causes
88the \fI-v\fR option not to turn on debugging output. Additionally, the
89"new" behavior of \fIadd\fR does verbose adds in a way with more reliable
90output; the old way is more likely to give you inconsistent error messages
91in cases where you don't have Kerberos authentication or are attempting
92to attach restricted lockers you do not have access to.
93.TP 9
94.B \-p
95This option causes \fIadd\fR to print the contents of the user's PATH. In
96the case where a path element is of the form /mit/foo/arch/pmax_ul4/bin,
97\fIadd\fR substitutes the string {add foo} for that path element. This
98serves to shorten and make more readable the user's PATH.
99.TP 9
100.B \-e
101This option is used for supporting the use of \fIadd\fR in the user's
102~/.environment file. The user need never specify this option as that is
103taken care of by a special version of the alias that is in effect when
104the .environment file is run. This option causes \fIadd\fR to modify
105the shell variables \fIathena_path\fR and \fIathena_manpath\fR instead
106of the environment variables PATH and MANPATH as it normally does.
107.TP 9
108.B \-a
109This option causes \fIadd\fR to pass all remaining options on the command
110line directly to \fIattach\fR. This is useful for passing flags meant to
111be interpreted by \fIattach\fR and not by \fIadd\fR.
112
113.SH VARIABLES
114The shell variable \fIadd_flags\fR may be set to specify default flags
115that \fIadd\fR is intended to use for all commands. For example, if
116you desire that attach always be verbose and give warnings for lockers
117that do not have binary directories supporting your platform, you might
118put a ``set add_flags = "-v -w"'' in your ~/.cshrc.mine file.
119
120The shell variable \fIbindir\fR is used when generating old style
121paths.
122
123The environment variable \fIATHENA_SYS\fR is used to determine the
124sysname value when determining path names for new style paths.
125
126.SH FILES
127.PP
128/usr/athena/lib/init/cshrc    global Athena cshrc file
129/usr/athena/lib/init/add      the script the add alias calls
130.br
131~/.cshrc                      user's cshrc file
132~/.environment                user's environment file
133
134.SH "SEE ALSO"
135attach(1), athdir(1), man(1), csh(1), lockers(7)
136
137.SH BUGS
138``\fIadd\fR -a -v foo'' and other similar commands attempting to modify
139the output behaviour of \fIattach\fR directly will cause \fIadd\fR to
140fail.  Such options will override the -p that \fIadd\fR passes to
141\fIattach\fR.  This is because \fIadd\fR does not attempt to insert
142the -p between \fIattach\fR's flags and lockernames; it places it
143first.
144
145Since \fIadd\fR does not parse the arguments to \fIattach\fR, and
146because \fIattach\fR may return ambiguous error codes (in the case of
147attempting to attach multiple lockers), \fIadd\fR's behavior may be
148suboptimal in certain situations. For example, ``\fIadd\fR -v sdjfb''
149will invoke \fIattach\fR twice, even though the first time returned an
150error, because it doesn't know any better.
Note: See TracBrowser for help on using the repository browser.