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

Re: while loop grammar question



On Mon, Dec 9, 2024, at 10:17 AM, Ray Andrews wrote:
> Indeed I can find " /usr/bin/[ " but those others are commands too?

Yes.  They have exit statuses, can be redirected, etc.

	% (( ++nonsense++ )) 2>/dev/null
	% print $?
	2

> Where are they?  But I think I recall Bart saying that '[[' is a zsh 
> internal.

They're built-in commands, as is zsh's own test/[.  Unlike test/[,
they have to be implemented as syntax because of their special
parsing rules.

-- 
vq




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