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