[net.unix-wizards] setenv problem in C-shell

tcs@USNA.arpa (Terry Slattery) (09/01/86)

The C-shell complains with:
	setenv: Too many arguments
when executing
	eval `tset -s -Q -I -m 'dialup:?vt100'`
where the vt100 termcap plus the noglob and TERM output of tset
is greater than 512 characters.  This is on our 4.2 780 as well
as our UTX 1.3 Gould.  Several other systems I have access to have
the same problem.  I briefly looked at the code but havn't
determined the problem.

Before spending more time on it, I'd like to know if anyone else
has fixed this bug.

	-tcs
	Terry Slattery	  U.S. Naval Academy	301-267-4413
	ARPA: tcs@usna.arpa
	UUCP: decvax!brl-smoke!usna!tcs

DU>@brl-smoke.ARPA (09/01/86)

You're probably going to hear this a lot, but that's not a bug.

You should do:

set noglob; eval `tset ... `

Of course, if you did, then ignore this, and forgive me....

	<mike

jerryp@tektools.UUCP (Jerry Peek) (09/02/86)

[Doesn't this belong in net.unix -- instead of unix-wizards?]

In article <3454@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

(The wildcard characters, by the way, are almost certainly what's causing
your problem.  The "tset" command is probably spitting out * or ? or [ ]
characters, which expand into filenames, which screw up the contents of
the TERM or TERMCAP enviornment variables... and make them too long.)

--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@tektronix.csnet
Phone:      +1 503 627-1603