"set noglob" in "tset"
v.wales%ucla-locus at sri-unix.UUCP
v.wales%ucla-locus at sri-unix.UUCP
Wed Feb 8 03:32:45 AEST 1984
From: Rich Wales <v.wales at ucla-locus>
Phil --
This is in response to your question about why "tset -s" doesn't gener-
ate a "set noglob" as well as an "unset noglob". That is, why do you
have to say
set noglob
eval `tset -sQ`
Actually, "tset -s" does generate a "set noglob" (at least, some ver-
sions do). However, a bug or misfeature in the C shell prevents this
command from having the desired effect.
The problem is that the builtin C-shell command "eval" parses its entire
argument list before executing anything. In particular, "eval" performs
any necessary wildcard expansion before trying to do anything. Hence, a
"set noglob" included as part of the "eval" argument is not executed
until after wildcard expansion in the TERMCAP value has already taken
place.
I suspect that the above-described behaviour of the "eval" command is
too firmly entrenched in the inner recesses of the C shell to be fixed
(though I would love to hear from anyone who knows otherwise); hence the
evasive manoeuvre of sticking in a "set noglob" before the "eval".
Another thing to note about "tset", by the way: I once fixed our "tset"
so that it would output "\041" instead of "!", and "\140" instead of
"`", in the TERMCAP string. It seems that the C shell insists these two
characters are magic whether or not "noglob" is set.
-- Rich <v.wales at UCLA-LOCUS>
More information about the Comp.unix.wizards
mailing list