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

$TERM, zsh/termcap, crash



if $TERM is not defined on a system and the zsh/termcap module is loaded, the shell dies.

//start code

% zsh -f
yoyo% export TERM=xterm-hundred-billion-colors
zsh: can't find terminal definition for xterm-hundred-billion-colors
yoyo% zmodload zsh/termcap
terminals database is inaccessible

//end code

on freeBSD (7.2 and several older versions; 7.2 above) the shell dies with a message "terminals database is inaccessible" and a status 1.

similar results on Linux 2.6.31.1, 2.6.31.4 (not sure what distros) and Ubuntu 9.10 (2.6.31-14) with a message "unknown terminal type" and status 1.

in these form it can be gracefully tested:
	test $(zmodload zsh/termcap)
	[ $(zmodload zsh/termcap) ]
 but if tested in a sublist the shell still dies:
	zmodload zsh/termcap && echo $?


--
        ...atom

 ________________________
 http://atom.smasher.org/
 762A 3B98 A3C3 96C9 C6B7 582A B88D 52E4 D9F5 7808
 -------------------------------------------------

	"If people had understood how patents would be granted when most
	 of today's ideas were invented and had taken out patents, the
	 industry would be at a complete standstill today."
		-- Bill Gates, Microsoft CEO, 1991



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