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

Re: $TERM, zsh/termcap, crash



On Wed, 11 Nov 2009, Atom Smasher wrote:

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 $?
===============

on second thought, no. apparently the "zmodload zsh/termcap" doesn't return a 1, it dies and causes the shell to return a 1 (in addition to my syntax, above, being just plain wrong).

this seems to work on a command line:
	if $(zsh -c "zmodload zsh/termcap")
	then
	    zmodload zsh/termcap
	fi

but it's giving me trouble in a zshrc... need rest...


--
        ...atom

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

	"A people that values its privileges above its principles
	 soon loses both."
		-- Dwight D. Eisenhower



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