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 |
---|
19 | add \- attach a filesystem, add it to your path and manpath |
---|
20 | |
---|
21 | .SH SYNOPSIS |
---|
22 | add [-f] [-r] [-q] [-w] [-a \fIattachopts\fP] filesystemname filesystemname ... |
---|
23 | |
---|
24 | add [-f] [-r] pathname pathname ... |
---|
25 | |
---|
26 | add [-p] |
---|
27 | |
---|
28 | .SH DESCRIPTION |
---|
29 | \fIadd\fR is an alias provided by the standard Athena dotfiles. It is |
---|
30 | intended to make the process of using software that is stored in |
---|
31 | remote filesystems easier. In normal use, it requires one argument, |
---|
32 | the name of a filesystem to \fIadd\fR. In that case, it adds the |
---|
33 | appropriate binary directory (arch/sun4x_56/bin, decmipsbin, etc.) to |
---|
34 | the end of your command search path so that you can find programs in |
---|
35 | the locker, and adds the man directory to your MANPATH so that |
---|
36 | \fIman\fR can find manpages that may be installed in that filesystem. |
---|
37 | In addition, if no binary directory matches the current system, the |
---|
38 | \fIATHENA_SYS_COMPAT\fR environment variable (see below) may be |
---|
39 | consulted for a list of compatible binary directories. (See |
---|
40 | .BR lockers (7) |
---|
41 | for suggestions on how to organize and maintain |
---|
42 | lockers.) |
---|
43 | |
---|
44 | A pathname (starting with a ``.'' or ``/'') may be specified in place |
---|
45 | of a filesystem name. In this case, the string is added directly to |
---|
46 | the path rather than being interpreted as a lockername and resolved |
---|
47 | into a pathname. Note that filesystem names and pathnames may not be |
---|
48 | mixed in a single invocation of add. |
---|
49 | |
---|
50 | When no arguments are used, \fIadd\fR will print out the (possibly |
---|
51 | abbreviated) 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, |
---|
55 | though more efficient than, \fIadd locker1; add locker2; add |
---|
56 | locker3\fR. Thus when adding lockers to the front of your PATH, they |
---|
57 | will appear as \fIlocker3 locker2 locker1\fR at the front of your |
---|
58 | PATH. |
---|
59 | |
---|
60 | \fIadd\fR may be used interactively while logged in, or in your |
---|
61 | ~/.environment file. |
---|
62 | |
---|
63 | Typing "alias add" in your C shell will reveal that it is an alias |
---|
64 | which evaluates the output of a special invocation of |
---|
65 | .BR attach (1)\fP. |
---|
66 | Note 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 |
---|
73 | causes it to add lockers to the front of your path instead. If the |
---|
74 | locker is already in your path but not at the front, it will be moved |
---|
75 | there. However, when -f is used in your ~/.environment file, it does |
---|
76 | not affect lockers already in your path. |
---|
77 | |
---|
78 | This feature is useful when you want to cause programs in the lockers |
---|
79 | to replace programs found in other places, such as on the system |
---|
80 | packs. You usually want lockers added to the end of your path, |
---|
81 | however, to prevent the possibility of locker maintainers replacing |
---|
82 | important binaries with things you don't expect. |
---|
83 | .TP 9 |
---|
84 | .B \-r |
---|
85 | This option causes \fIadd\fR to remove the specified lockers or |
---|
86 | pathnames from your path. |
---|
87 | .TP 9 |
---|
88 | .B \-w |
---|
89 | This option causes \fIadd\fR to warn you in the event a locker you have |
---|
90 | asked to be added does not support your platform. A binary directory |
---|
91 | will not be added to your PATH, but if a man directory exists it will |
---|
92 | still be added to your MANPATH. \fIadd\fR normally says nothing in this |
---|
93 | case. (Note that in the case of using a compatiblity mode, you will |
---|
94 | always be warned.) |
---|
95 | .TP 9 |
---|
96 | .B \-p |
---|
97 | This option causes \fIadd\fR to print the contents of the user's PATH. In |
---|
98 | the 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 |
---|
100 | serves to shorten and make more readable the user's PATH. In addition, |
---|
101 | if a path element is using compatibility, such as a sun4x_56 system |
---|
102 | having a sun4x_55 directory in its path, an asterisk will be added, as |
---|
103 | in {add foo*}. |
---|
104 | .TP 9 |
---|
105 | .B \-P athena_path |
---|
106 | This 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 |
---|
108 | as that is taken care of by a special version of the alias that is in |
---|
109 | effect when the .environment file is run. This option is used to pass |
---|
110 | the \fIathena_path\fR shell variable to \fIadd\fR on the command line, |
---|
111 | and cause \fIadd\fR to modify that variable in its output instead of |
---|
112 | the environment variable PATH as it normally does. In the C shell |
---|
113 | case, \fIathena_path\fR is space-separated, and so must be quoted in |
---|
114 | the shell in order to be passed to \fIadd\fR as a single argument. In |
---|
115 | the Bourne shell case, \fIathena_path\fR is colon-separated, so this |
---|
116 | isn't necessary. |
---|
117 | .TP 9 |
---|
118 | .B \-a |
---|
119 | This option causes \fIadd\fR to pass all remaining options on the command |
---|
120 | line directly to \fIattach\fR. This is useful for passing flags meant to |
---|
121 | be interpreted by \fIattach\fR and not by \fIadd\fR. |
---|
122 | .TP 9 |
---|
123 | .B \-b |
---|
124 | This option causes \fIadd\fR to produce output suitable for interpretation |
---|
125 | by the Bourne shell. Note that this option is only intended for use by |
---|
126 | shell aliases or subroutines which call attach directly. Using this option |
---|
127 | explicitly on the command line with the C shell add alias will cause the |
---|
128 | alias to fail. |
---|
129 | .TP 9 |
---|
130 | .B \-q |
---|
131 | This option causes \fIadd\fR to suppress warning messages given when a |
---|
132 | platform from \fIATHENA_SYS_COMPAT\fR (see below) is added to the user's |
---|
133 | path. |
---|
134 | .SH VARIABLES |
---|
135 | The shell variable \fIadd_flags\fR may be set to specify default flags |
---|
136 | that \fIadd\fR is intended to use for all commands. For example, if |
---|
137 | you desire that attach always give warnings for lockers that do not |
---|
138 | have binary directories supporting your platform, you might put a |
---|
139 | ``set add_flags = "-w"'' in your ~/.cshrc.mine file. |
---|
140 | |
---|
141 | The environment variable \fIATHENA_SYS\fR is used to determine the |
---|
142 | sysname value when determining path names for new-style paths. |
---|
143 | |
---|
144 | The environment variable \fIATHENA_SYS_COMPAT\fR is a colon-separated |
---|
145 | list of fallback sysname values which are known to be generally |
---|
146 | compatible 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 |
---|
148 | set to sun4x_55:sun4m_54. Then if there is no arch/sun4x_56 directory |
---|
149 | available, arch/sun4x_55 will be checked, etc. |
---|
150 | |
---|
151 | .SH NOTE |
---|
152 | Most of the work of the \fIadd\fR alias is done by |
---|
153 | .BR attach (1)\fR, |
---|
154 | by 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" |
---|
164 | attach(1), athdir(1), man(1), csh(1), lockers(7) |
---|
165 | |
---|
166 | .SH BUGS |
---|
167 | All of \fIadd\fR's visible output is sent to stderr. The stdout pipe |
---|
168 | is use strictly for the output of commands the shell is intended to |
---|
169 | evaluate. |
---|
170 | |
---|
171 | .SH AUTHORS |
---|
172 | Craig Fields, MIT Information Systems |
---|
173 | .br |
---|
174 | Dan Winship, MIT Information Systems |
---|
175 | .PP |
---|
176 | Copyright 1998 Massachusetts Institute of Technology |
---|