[15801] | 1 | .\" $Id: add.1,v 1.10 2001-03-17 16:51:54 ghudson Exp $ |
---|
[12589] | 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 |
---|
[11255] | 18 | .SH NAME |
---|
[12589] | 19 | add \- attach a filesystem, add it to your path and manpath |
---|
[11255] | 20 | |
---|
| 21 | .SH SYNOPSIS |
---|
[12589] | 22 | add [-f] [-r] [-q] [-w] [-a \fIattachopts\fP] filesystemname filesystemname ... |
---|
[11255] | 23 | |
---|
[12589] | 24 | add [-f] [-r] pathname pathname ... |
---|
[11566] | 25 | |
---|
[12589] | 26 | add [-p] |
---|
| 27 | |
---|
[11255] | 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. |
---|
[12589] | 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.) |
---|
[11255] | 43 | |
---|
[11566] | 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 | |
---|
[11255] | 50 | When no arguments are used, \fIadd\fR will print out the (possibly |
---|
[13267] | 51 | abbreviated) value of the user's PATH variable. |
---|
[11255] | 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 |
---|
[12589] | 64 | which evaluates the output of a special invocation of |
---|
| 65 | .BR attach (1)\fP. |
---|
[11255] | 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 |
---|
[12589] | 85 | This option causes \fIadd\fR to remove the specified lockers or |
---|
| 86 | pathnames from your path. |
---|
[11255] | 87 | .TP 9 |
---|
| 88 | .B \-w |
---|
| 89 | This option causes \fIadd\fR to warn you in the event a locker you have |
---|
[15801] | 90 | asked 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 |
---|
| 92 | binary directory will not be added to your PATH, but if a man |
---|
| 93 | directory exists it will still be added to your MANPATH. \fIadd\fR |
---|
| 94 | normally says nothing in either case. |
---|
[11255] | 95 | .TP 9 |
---|
| 96 | .B \-p |
---|
| 97 | This option causes \fIadd\fR to print the contents of the user's PATH. In |
---|
[12589] | 98 | the case where a path element is of the form /mit/foo/arch/$ATHENA_SYS/bin, |
---|
[11255] | 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*}. |
---|
[11628] | 104 | .TP 9 |
---|
[11413] | 105 | .B \-P athena_path |
---|
[11628] | 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 |
---|
[11413] | 113 | case, \fIathena_path\fR is space-separated, and so must be quoted in |
---|
[11628] | 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. |
---|
[11255] | 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. |
---|
[11592] | 129 | .TP 9 |
---|
| 130 | .B \-q |
---|
[15801] | 131 | This option is obsolete. |
---|
[11255] | 132 | .SH VARIABLES |
---|
| 133 | The shell variable \fIadd_flags\fR may be set to specify default flags |
---|
| 134 | that \fIadd\fR is intended to use for all commands. For example, if |
---|
[12589] | 135 | you desire that attach always give warnings for lockers that do not |
---|
| 136 | have binary directories supporting your platform, you might put a |
---|
| 137 | ``set add_flags = "-w"'' in your ~/.cshrc.mine file. |
---|
[11255] | 138 | |
---|
| 139 | The environment variable \fIATHENA_SYS\fR is used to determine the |
---|
[12589] | 140 | sysname value when determining path names for new-style paths. |
---|
[11255] | 141 | |
---|
| 142 | The environment variable \fIATHENA_SYS_COMPAT\fR is a colon-separated |
---|
| 143 | list of fallback sysname values which are known to be generally |
---|
| 144 | compatible 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 |
---|
| 146 | set to sun4x_55:sun4m_54. Then if there is no arch/sun4x_56 directory |
---|
| 147 | available, arch/sun4x_55 will be checked, etc. |
---|
| 148 | |
---|
| 149 | .SH NOTE |
---|
[12589] | 150 | Most of the work of the \fIadd\fR alias is done by |
---|
| 151 | .BR attach (1)\fR, |
---|
| 152 | by giving it the option \fI-Padd\fR. |
---|
[11255] | 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" |
---|
| 162 | attach(1), athdir(1), man(1), csh(1), lockers(7) |
---|
| 163 | |
---|
| 164 | .SH BUGS |
---|
| 165 | All of \fIadd\fR's visible output is sent to stderr. The stdout pipe |
---|
| 166 | is use strictly for the output of commands the shell is intended to |
---|
| 167 | evaluate. |
---|
[12589] | 168 | |
---|
| 169 | .SH AUTHORS |
---|
| 170 | Craig Fields, MIT Information Systems |
---|
[13268] | 171 | .br |
---|
[12589] | 172 | Dan Winship, MIT Information Systems |
---|
| 173 | .PP |
---|
| 174 | Copyright 1998 Massachusetts Institute of Technology |
---|