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

Revision 15801, 7.2 KB checked in by ghudson, 24 years ago (diff)
From rbasch: update for recent change to add.c.
Line 
1.\" $Id: add.1,v 1.10 2001-03-17 16:51:54 ghudson 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, or if a platform from
91\fIATHENA_SYS_COMPAT\fR (see below) is used.  In the former case, a
92binary directory will not be added to your PATH, but if a man
93directory exists it will still be added to your MANPATH. \fIadd\fR
94normally says nothing in either case.
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 is obsolete.
132.SH VARIABLES
133The shell variable \fIadd_flags\fR may be set to specify default flags
134that \fIadd\fR is intended to use for all commands. For example, if
135you desire that attach always give warnings for lockers that do not
136have binary directories supporting your platform, you might put a
137``set add_flags = "-w"'' in your ~/.cshrc.mine file.
138
139The environment variable \fIATHENA_SYS\fR is used to determine the
140sysname value when determining path names for new-style paths.
141
142The environment variable \fIATHENA_SYS_COMPAT\fR is a colon-separated
143list of fallback sysname values which are known to be generally
144compatible with the current system. Thus, on a Solaris 2.6 machine,
145\fIATHENA_SYS\fR may be set to sun4x_56, with \fIATHENA_SYS_COMPAT\fR
146set to sun4x_55:sun4m_54. Then if there is no arch/sun4x_56 directory
147available, arch/sun4x_55 will be checked, etc.
148
149.SH NOTE
150Most of the work of the \fIadd\fR alias is done by
151.BR attach (1)\fR,
152by giving it the option \fI-Padd\fR.
153
154.SH FILES
155.PP
156/usr/athena/lib/init/cshrc    global Athena cshrc file
157.br
158~/.cshrc                      user's cshrc file
159~/.environment                user's environment file
160
161.SH "SEE ALSO"
162attach(1), athdir(1), man(1), csh(1), lockers(7)
163
164.SH BUGS
165All of \fIadd\fR's visible output is sent to stderr. The stdout pipe
166is use strictly for the output of commands the shell is intended to
167evaluate.
168
169.SH AUTHORS
170Craig Fields, MIT Information Systems
171.br
172Dan Winship, MIT Information Systems
173.PP
174Copyright 1998 Massachusetts Institute of Technology
Note: See TracBrowser for help on using the repository browser.