grammar

Ray Andrews <[email protected]> Wed, 29 Apr 2026 08:59:26 -0700
Newsgroups gmane.comp.shells.zsh.user
Message-ID <[email protected]>
I was going thru some old stuff and I came across something like this:

% if [[ $path ]] echo $path

... it works, which makes me uncomfortable because it ain't good 
grammar.  Or is it?  Without the usual:

if [[ ]]; then

fi

... I'm surprised that it works.  Perhaps it ends up being exactly like:

[[ $path ]] && echo $path     ?

  Should I view the 'then ... fi' grammar  as just optional code block 
controllers?

And:

(( length > max )) && length=max

... is there a shorter syntax for that?  I'll bet there is.