setenv problem in C-shell (and "tset")

Jerry Peek jerryp at tektools.UUCP
Wed Sep 3 17:24:11 AEST 1986


In article <1427 at tektools.UUCP>, net.unix-wizards, I followed up to a
followup article about "tset":
> In article <3454 at brl-smoke.ARPA> DU>@brl-smoke.ARPA writes:
> > You're probably going to hear this a lot...
> 
> and this is probably the 200th article that'll be posted, but I hate to see
> errors posted to the net without corrections...
> 
> > You should do:
> > 
> > set noglob; eval `tset ... `
> 
> Not just that!  Don't forget to do "unset noglob" -- otherwise, the shell
> won't expand filename wildcard characters afterwards.  Do this:
> 
> 	set noglob; eval `tset ...`; unset noglob

I shouldn't have used the word "errors" to describe the earlier
posting -- maybe the author has a different version of "tset" that
automatically outputs a "unset noglob".  My apologies if this is true.

Since then, I've noticed that under 4.3BSD and C-shell, "tset" outputs
both the "set noglob" and "unset noglob" commands automatically.  Here's a
demonstration (since I didn't use the "eval `tset`" business, you see the
output of "tset" on the screen; it doesn't change the current settings in
the shell):

Script started on Wed Sep  3 00:00:34 1986
% tset -sQ '?Enter terminal type'
TERM = (Enter terminal type) 4023
set noglob;
setenv TERM 4023 ;
setenv TERMCAP 'X4|tek4023|4023:so=^_H:se=^_@:cm=\034%r%+\040%+\040:nd=\t:bs:am:cl=4\E^L:co#80:li#24:up=1000UP:';
unset noglob;
% !!
tset -sQ '?Enter terminal type'
TERM = (Enter terminal type) xyz
Type xyz unknown
TERM = (unknown) ^C
% ^D
script done on Wed Sep  3 00:02:39 1986

The second "tset" commandline shows another new feature under 4.3:
if you give a terminal type that isn't in your termcap file, the 4.3BSD
"tset" will print "Type xxx unknown" and ask again.  Pre-4.3 versions
wouldn't ask again; they just quit without doing anything.

--Jerry Peek, Tektronix, Inc.
US Mail:    MS 74-900, P.O. Box 500, Beaverton, OR 97077
uucp:       {allegra,decvax,hplabs,ihnp4,ucbvax}!tektronix!tektools!jerryp
CS,ARPAnet: jerryp%tektools at tektronix.csnet
Phone:      +1 503 627-1603



More information about the Comp.unix mailing list