source: trunk/athena/bin/attach/add.1 @ 13268

Revision 13268, 7.3 KB checked in by danw, 25 years ago (diff)
add a missing .br
Line 
1.\" $Id: add.1,v 1.9 1999-06-22 01:16:19 danw Exp $
2.\"
3.\" Copyright 1997 by the Massachusetts Institute of Technology.
4.\"
5.\" Permission to use, copy, modify, and distribute this
6.\" software and its documentation for any purpose and without
7.\" fee is hereby granted, provided that the above copyright
8.\" notice appear in all copies and that both that copyright
9.\" notice and this permission notice appear in supporting
10.\" documentation, and that the name of M.I.T. not be used in
11.\" advertising or publicity pertaining to distribution of the
12.\" software without specific, written prior permission.
13.\" M.I.T. makes no representations about the suitability of
14.\" this software for any purpose.  It is provided "as is"
15.\" without express or implied warranty.
16.\"
17.TH ADD 1
18.SH NAME
19add \- attach a filesystem, add it to your path and manpath
20
21.SH SYNOPSIS
22add [-f] [-r] [-q] [-w] [-a \fIattachopts\fP] filesystemname filesystemname ...
23
24add [-f] [-r] pathname pathname ...
25
26add [-p]
27
28.SH DESCRIPTION
29\fIadd\fR is an alias provided by the standard Athena dotfiles.  It is
30intended to make the process of using software that is stored in
31remote filesystems easier.  In normal use, it requires one argument,
32the name of a filesystem to \fIadd\fR.  In that case, it adds the
33appropriate binary directory (arch/sun4x_56/bin, decmipsbin, etc.) to
34the end of your command search path so that you can find programs in
35the locker, and adds the man directory to your MANPATH so that
36\fIman\fR can find manpages that may be installed in that filesystem.
37In addition, if no binary directory matches the current system, the
38\fIATHENA_SYS_COMPAT\fR environment variable (see below) may be
39consulted for a list of compatible binary directories.  (See
40.BR lockers (7)
41for suggestions on how to organize and maintain
42lockers.)
43
44A pathname (starting with a ``.'' or ``/'') may be specified in place
45of a filesystem name. In this case, the string is added directly to
46the path rather than being interpreted as a lockername and resolved
47into a pathname. Note that filesystem names and pathnames may not be
48mixed in a single invocation of add.
49
50When no arguments are used, \fIadd\fR will print out the (possibly
51abbreviated) value of the user's PATH variable.
52
53\fIadd\fR may also take multiple filesystem arguments. In this case,
54\fIadd locker1 locker2 locker3\fR is functionally equivalent to,
55though more efficient than, \fIadd locker1; add locker2; add
56locker3\fR. Thus when adding lockers to the front of your PATH, they
57will appear as \fIlocker3 locker2 locker1\fR at the front of your
58PATH.
59
60\fIadd\fR may be used interactively while logged in, or in your
61~/.environment file.
62
63Typing "alias add" in your C shell will reveal that it is an alias
64which evaluates the output of a special invocation of
65.BR attach (1)\fP.
66Note that Bourne shell output is also available.
67
68.SH OPTIONS
69\fIadd\fR accepts the following options:
70.TP 9
71.B \-f
72\fIadd\fR normally adds lockers to the end of your path. This option
73causes it to add lockers to the front of your path instead. If the
74locker is already in your path but not at the front, it will be moved
75there. However, when -f is used in your ~/.environment file, it does
76not affect lockers already in your path.
77
78This feature is useful when you want to cause programs in the lockers
79to replace programs found in other places, such as on the system
80packs. You usually want lockers added to the end of your path,
81however, to prevent the possibility of locker maintainers replacing
82important binaries with things you don't expect.
83.TP 9
84.B \-r
85This option causes \fIadd\fR to remove the specified lockers or
86pathnames from your path.
87.TP 9
88.B \-w
89This option causes \fIadd\fR to warn you in the event a locker you have
90asked to be added does not support your platform. A binary directory
91will not be added to your PATH, but if a man directory exists it will
92still be added to your MANPATH. \fIadd\fR normally says nothing in this
93case. (Note that in the case of using a compatiblity mode, you will
94always be warned.)
95.TP 9
96.B \-p
97This option causes \fIadd\fR to print the contents of the user's PATH. In
98the case where a path element is of the form /mit/foo/arch/$ATHENA_SYS/bin,
99\fIadd\fR substitutes the string {add foo} for that path element. This
100serves to shorten and make more readable the user's PATH. In addition,
101if a path element is using compatibility, such as a sun4x_56 system
102having a sun4x_55 directory in its path, an asterisk will be added, as
103in {add foo*}.
104.TP 9
105.B \-P athena_path
106This option is used for supporting the use of \fIadd\fR in the user's
107~/.environment file. The user normally need never specify this option
108as that is taken care of by a special version of the alias that is in
109effect when the .environment file is run. This option is used to pass
110the \fIathena_path\fR shell variable to \fIadd\fR on the command line,
111and cause \fIadd\fR to modify that variable in its output instead of
112the environment variable PATH as it normally does. In the C shell
113case, \fIathena_path\fR is space-separated, and so must be quoted in
114the shell in order to be passed to \fIadd\fR as a single argument. In
115the Bourne shell case, \fIathena_path\fR is colon-separated, so this
116isn't necessary.
117.TP 9
118.B \-a
119This option causes \fIadd\fR to pass all remaining options on the command
120line directly to \fIattach\fR. This is useful for passing flags meant to
121be interpreted by \fIattach\fR and not by \fIadd\fR.
122.TP 9
123.B \-b
124This option causes \fIadd\fR to produce output suitable for interpretation
125by the Bourne shell. Note that this option is only intended for use by
126shell aliases or subroutines which call attach directly. Using this option
127explicitly on the command line with the C shell add alias will cause the
128alias to fail.
129.TP 9
130.B \-q
131This option causes \fIadd\fR to suppress warning messages given when a
132platform from \fIATHENA_SYS_COMPAT\fR (see below) is added to the user's
133path.
134.SH VARIABLES
135The shell variable \fIadd_flags\fR may be set to specify default flags
136that \fIadd\fR is intended to use for all commands. For example, if
137you desire that attach always give warnings for lockers that do not
138have binary directories supporting your platform, you might put a
139``set add_flags = "-w"'' in your ~/.cshrc.mine file.
140
141The environment variable \fIATHENA_SYS\fR is used to determine the
142sysname value when determining path names for new-style paths.
143
144The environment variable \fIATHENA_SYS_COMPAT\fR is a colon-separated
145list of fallback sysname values which are known to be generally
146compatible with the current system. Thus, on a Solaris 2.6 machine,
147\fIATHENA_SYS\fR may be set to sun4x_56, with \fIATHENA_SYS_COMPAT\fR
148set to sun4x_55:sun4m_54. Then if there is no arch/sun4x_56 directory
149available, arch/sun4x_55 will be checked, etc.
150
151.SH NOTE
152Most of the work of the \fIadd\fR alias is done by
153.BR attach (1)\fR,
154by giving it the option \fI-Padd\fR.
155
156.SH FILES
157.PP
158/usr/athena/lib/init/cshrc    global Athena cshrc file
159.br
160~/.cshrc                      user's cshrc file
161~/.environment                user's environment file
162
163.SH "SEE ALSO"
164attach(1), athdir(1), man(1), csh(1), lockers(7)
165
166.SH BUGS
167All of \fIadd\fR's visible output is sent to stderr. The stdout pipe
168is use strictly for the output of commands the shell is intended to
169evaluate.
170
171.SH AUTHORS
172Craig Fields, MIT Information Systems
173.br
174Dan Winship, MIT Information Systems
175.PP
176Copyright 1998 Massachusetts Institute of Technology
Note: See TracBrowser for help on using the repository browser.