[2767] in Release_Engineering
["Barr3y Jaspan": Re: add changes]
daemon@ATHENA.MIT.EDU (Mark Rosenstein)
Wed Apr 8 15:02:43 1992
Date: Wed, 8 Apr 92 15:02:01 -0400
From: Mark Rosenstein <mar@MIT.EDU>
To: dryfoo@Athena.MIT.EDU
Cc: bjaspan@Athena.MIT.EDU, marc@Athena.MIT.EDU, rel-eng@Athena.MIT.EDU
In-Reply-To: dryfoo@Athena.MIT.EDU's message of Wed, 08 Apr 92 13:46:56 EDT <9204081746.AA26282@thelonious.MIT.EDU>
I hadn't intended to start such a discussion here, although I'm glad
to get the comments.
The Athena Requirements Team did not ask us to support multiple
lockers with a single add command. While this does not necessarily
mean that we can't do it, it does complicate the implementation
considerably and I would want to go back to ART with this question.
Allowing the "-v" before the lockername is a good idea, I'm not sure
why I didn't think of it.
The authentication problem is easily addressed by using "-h -n" on the
optional invocation of attach. There's no other way to do this since
you can't get attach to tell you both the mount point and the
verbosity in one invocation.
No, add in .environment should not modify athena_manpath. MANPATH is
already set. Actually, it should modify both in case the user's
.environment resets MANPATH based on athena_manpath.
Revised diff:
-Mark
*** /usr/athena/lib/init/cshrc Thu Aug 1 03:48:36 1991
--- /afs/athena.mit.edu/user/m/a/mar/cshrc Wed Apr 8 15:01:44 1992
***************
*** 35,40 ****
--- 35,62 ----
setenv MANPATH $athena_manpath
+ # Special version of add alias that will work in your .environment
+ # file. This is replaced further down with the version that works
+ # when you are logged in.
+ alias extend 'if (-d \!:2) if ("$\!:1" \!~ *"\!:2"*) set extendyes && \\
+ if ($?extendyes && $?verboseadd) echo \!:2 added to end of \$\!:1 && \\
+ if ($?extendyes) setenv \!:1 ${\!:1}:\!:2 && \\
+ unset extendyes'
+ alias sextend 'if (-d \!:2) if ("$\!:1" \!~ *"\!:2"*) set extendyes && \\
+ if ($?extendyes && $?verboseadd) echo \!:2 added to end of \$\!:1 && \\
+ if ($?extendyes) set \!:1=(${\!:1} \!:2) && \\
+ unset extendyes'
+ alias add 'set locker=\!:1 && \\
+ if ("x\!:$" == x-v) set verboseadd locker=\!:1 && \\
+ if ("x\!:1" == x-v) set verboseadd locker=\!:$ && \\
+ if $?verboseadd attach -n -h $locker &&\\
+ set dir = `attach -p $locker` && \\
+ if ("$PATH" =~ *"$dir/$bindir"*) rehash && \\
+ sextend athena_path $dir/$bindir && \\
+ sextend athena_manpath $dir/man && \\
+ extend MANPATH $dir/man && \\
+ unset dir verboseadd locker'
+
# Run user environment customizations identified in your /.environment
# file. This is the place to include your own environment variables,
# attach commands, and other system wide setup commands. You can also
***************
*** 44,49 ****
--- 66,74 ----
if ((! $?NOCALLS) && (-r ~/.environment)) source ~/.environment
+ unalias extend sextend add
+ alias add 'echo Use add in your ~/.environment, not your ~/.path.'
+
# Set up default search path, if not yet set. Use your ~/.path file
# to provide an alternative path -- this file should be of the form
# "set path=...", and can refer to the shell variable $athena_path,
***************
*** 100,111 ****
endif
# aliases dealing with adding locker programs
! alias extend 'if (-d \!:2) if ("$\!:1" \!~ *"\!:2"*) setenv \!:1 ${\!:1}:\!:2'
! alias add 'set dir = `attach -p \!*` && \\
if ("$PATH" =~ *"$dir/$bindir"*) rehash && \\
extend PATH $dir/$bindir && \\
extend MANPATH $dir/man && \\
! unset dir'
# aliases dealing with subjects
alias setup_X '( setenv SUBJECT \!:1 ; ( xterm -title \!* & ) )'
--- 125,144 ----
endif
# aliases dealing with adding locker programs
! # 'add -v locker' will be verbose about it
! alias extend 'if (-d \!:2) if ("$\!:1" \!~ *"\!:2"*) set extendyes && \\
! if ($?extendyes && $?verboseadd) echo \!:2 added to end of \$\!:1 && \\
! if ($?extendyes) setenv \!:1 ${\!:1}:\!:2 && \\
! unset extendyes'
! alias add 'set locker=\!:1 && \\
! if ("x\!:$" == x-v) set verboseadd locker=\!:1 && \\
! if ("x\!:1" == x-v) set verboseadd locker=\!:$ && \\
! if $?verboseadd attach -n -h $locker &&\\
! set dir = `attach -p $locker` && \\
if ("$PATH" =~ *"$dir/$bindir"*) rehash && \\
extend PATH $dir/$bindir && \\
extend MANPATH $dir/man && \\
! unset dir verboseadd locker'
# aliases dealing with subjects
alias setup_X '( setenv SUBJECT \!:1 ; ( xterm -title \!* & ) )'