[2797] in testers
sun4 7.7P: add
daemon@ATHENA.MIT.EDU (John Hawkinson)
Mon Jan 30 17:22:08 1995
Date: Mon, 30 Jan 1995 17:21:37 -0500
To: testers@MIT.EDU
From: John Hawkinson <jhawk@MIT.EDU>
I finally took a little bit of time to look at the new add; I regret I
haven't made thee comments earlier.... Most of these are
bulletproofing and reflect the way I would have written add, and it
may be a foregone conclusion that some of them may not be fixed.
It requires environment or shell variables
to be defined in order for the script to be
sourced (initdir).
It requires that certain commands be in the user's
path, but does not set the path explicitly. It is
a c-shell script, but nonetheless expects PATH
to be defined, which is not guaranteed.
Such commands include machtype and attach.
It requires MANPATH be set. I tend to encounter
this is a lot as I use add on a machine where
I normally unset MANPATH.
It's option parsing is not 100% robust. For instance:
> add -v
add_attach: Undefined variable.
The add alias sources $initdir/add every time it's
invoked; I doubt the shell caches this (though AFS
probably does). Is there some reason that it does
not simply create a large alias (the semantic
equivalent of:
alias add 'set add_opts = (\!:*); '"`cat $initdir/add`"
I am far from a csh scripting person (detesting
csh as I do), but it seems to me that if possible,
$initdir should be evaluated in $initdir/cshrc,
rather than each time add is called, if it is decided
that importing the whole thing is not appropriate.
--jhawk