Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: TERM setting influences `case' reserved word



On Sun Oct 29 02:01:56 1995, Zoltan Hidvegi wrote about ``Re: TERM setting influences `case' reserved word'':
> 
> Zvi Har'El wrote:
> > 
> > Hi there, 
> > I am using zsh 2.6-beta10, with history patches in archive/337 and 376.
> > I compiled it with gnu termcap 1.3 and gcc 2.7.0 on a sparcstation running
> > SunOS 4.1.3. I have a very surprising problem. Certain settings of the TERM 
> > environment variable make the `case' reserved word change its behavior, and a 
> > statement lime `case $i in' yields `command not found: case'. For example, 
> > TERM=xterms produces the problem, while TERM=xterm and TERM=xterm24 do not! 
> 
> A while ago someone reported that some systems has a bug in the termcap
> library which causes problems when a termcap entry is longer that 1024 bytes.
> It may be possible that you have such a problem.  I tried this on a SunOS
> 4.1.3 machine and I was unable to reproduce it.
> 
> Cheers,
> 
>    Zoltan
> 
> 
> 
Let me reiterate that I am using GNU's libtermcap not the SunOS's, as well as
GNU's termcap description file.  Using GNU 's termcap description file with
regular SunOS libtermcap would really produce `termcap entry too long'.
Also, xterms and xterm24 are synonyms, as the following excerpt from GNU's
/usr/local/etc/termcap (by Eric S. Raymond et als), version 9.8.1, shows:

xterm24|vs100-24|xterm terminal emulator (24 lines) (X11R6 window system):\
        :co#80:li#24:\
        :tc=xterm:
xterms|vs100s|xterm terminal emulator (small) (X11R6 window system):\
        :tc=xterm24:

Note that with SUnOS's own /etc/termcap, xterm24 is undefined and xterms do not
generate a problem.


leeor:~$ TERMCAP=/etc/termcap;TERM=xterms; source .zshrc  <-- OK

leeor:~$ TERMCAP=/etc/termcap ; TERM=xterm24 ; source .zshrc  <-- OK
zsh: can't find termcap info for xterm24

leeor:~$ TERMCAP=/usr/local/etc/termcap ; TERM=xterm24 ; source .zshrc <-- OK
	
leeor:~$ TERMCAP=/usr/local/etc/termcap ; TERM=xterms ; source .zshrc <-- BAD
.zshrc: command not found: case [2]
.zshrc: parse error near `)' [3]
.zshrc: parse error near `;;' [5]
.zshrc: parse error near `)' [6]
.zshrc: command not found: esac [7]
.zshrc: command not found: case [28]
.zshrc: parse error near `)' [29]
.zshrc: parse error near `)' [30]
.zshrc: command not found: esac [31]
.zshrc: parse error near `)' [35]
.zshrc: parse error near `)' [36]
.zshrc: parse error near `;;' [37]
.zshrc: parse error near `)' [38]
.zshrc: command not found: esac [39]
.zshrc: parse error near `}' [40]

[.zshrc goes as follows:
#$Id: .zshrc,v 1.2 1995/09/29 08:11:24 rl Exp $
case $GID in
5000)   L=/usr/local1
        CDPATH=:~L
        umask 002;;
*)      umask 027;;
esac
stty -tabs intr '^C' erase '^H' susp '^Z'
...]

-- 
Dr. Zvi Har'El <rl@xxxxxxxxxxxxxxxxxxx>              Department of Mathematics
+972-4-294094(Phone)                 Technion - Israel Institute of Technology
+972-4-324654(FAX)     http://gauss.technion.ac.il/~rl     Haifa 32000, ISRAEL
``If you can't say somethin' nice, don't say nothin' at all.''--Thumper (1942)



Messages sorted by: Reverse Date, Date, Thread, Author