[2761] in Release_Engineering

home help back first fref pref prev next nref lref last post

add changes

daemon@ATHENA.MIT.EDU (Mark Rosenstein)
Tue Apr 7 18:49:21 1992

Date: Tue, 7 Apr 92 18:49:01 -0400
From: Mark Rosenstein <mar@MIT.EDU>
To: rel-eng@MIT.EDU
Cc: dryfoo@MIT.EDU, mar@MIT.EDU

The following diffs to /usr/athena/lib/init/cshrc allow add to be used
in your ~/.environment and will cause add to be verbose if invoked as
'add locker -v':
    athena% add maple -v
    attach: filesystem maple (ATLAS.MIT.EDU:/u4/lockers/maple) mounted on /mit/maple (read-write)
    /mit/maple/vaxbin added to end of $PATH
    /mit/maple/man added to end of $MANPATH
    athena%
My experimental cshrc is in /mit/mar/cshrc for a while, or use these
diffs.  It's been tested with both the athena csh and /mit/sipb/bindir/tcsh.
					-Mark


*** /usr/athena/lib/init/cshrc	Thu Aug  1 03:48:36 1991
--- /afs/athena.mit.edu/user/m/a/mar/cshrc	Tue Apr  7 18:46:25 1992
***************
*** 35,40 ****
--- 35,50 ----
  
  	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"*) setenv \!:1 ${\!:1}:\!:2'
+ 	alias sextend 'if (-d \!:2) if ("$\!:1" \!~ *"\!:2"*) set \!:1=(${\!:1} \!:2)'
+ 	alias add 'set dir = `attach -p \!*` && \\
+ 		sextend athena_path $dir/$bindir && \\
+ 		extend MANPATH $dir/man && \\
+ 		unset dir'
+ 
  	# 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 ****
--- 54,62 ----
  
          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 \!* & ) )'
--- 113,129 ----
  endif
  
  #   aliases dealing with adding locker programs
! #   'add locker -v' will be verbose about it
! alias extend 'if (-d \!:2) if ("$\!:1" \!~ *"\!:2"*) \\
! 	if $?noisy echo \!:2 added to end of \$\!:1 && \\
! 	setenv \!:1 ${\!:1}:\!:2'
! alias add 'if ("x\!:$" == x-v) set noisy && \\
! 	if $?noisy attach \!* &&\\
! 	set dir = `attach -p \!*` && \\
  	if ("$PATH" =~ *"$dir/$bindir"*) rehash && \\
  	extend PATH $dir/$bindir && \\
  	extend MANPATH $dir/man && \\
! 	unset dir noisy'
  
  #   aliases dealing with subjects
  alias setup_X '( setenv SUBJECT \!:1 ; ( xterm -title \!* & ) )'

home help back first fref pref prev next nref lref last post