Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Idiom for booleans
- X-seq: zsh-users 16207
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: Idiom for booleans
- Date: Fri, 12 Aug 2011 20:09:42 -0700
- In-reply-to: <CAELbujo=KyJyzzo1vW+ydLVA=PddguguXkBr7yN3zvmOgmYFpQ@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CAELbujo=KyJyzzo1vW+ydLVA=PddguguXkBr7yN3zvmOgmYFpQ@mail.gmail.com>
On Aug 12, 5:24pm, Micah Elliott wrote:
}
} % (( 0 ))
} ((: command not found
} % (( 1 )) # ok
This has to be something in your configuration. Try it with zsh -f ?
torch% (( 0 ))
torch% ((
math> ))
torch% (( 0 )) || echo nope
nope
torch%
This one I'm not sure is intentional:
torch% (( )) || echo oops
oops
torch%
} I'm trying to figure out if the $+ expansion, as in ${+param}, is
} worth making use of. What idiom do you use for it? I could see it as a
} boolean for testing flags.
Yes, that's a common usage.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author