antigen — pull request #48 by feltnerm (2013-03-12 04:59:29+00:00)
Title: Modified some conditional expressions (with DeMorgan's Law) to fix synta...

I'm on Arch Linux running zsh 5.0.2 (x86_64). On sourcing antigen I encountered a strange error:

``
-antigen-parse-args:44: bad pattern: [[
-antigen-parse-args:44: = not found
-antigen-parse-args:44: bad pattern: [[
-antigen-parse-args:44: = not found
fatal: repository '' does not exist
-antigen-ensure-repo:48: bad pattern: [[
-antigen-ensure-repo:48: = not found
``
I looked at the source and found two lines

**288:**
``
if ! [[ -z $old_rev || $old_rev == $new_rev ]];
then
``
and

**544:**
``
while ! [[ -z $1 || $1 == --* ]]; do
``
which were the source of the error. Specifically the '!' in front of the conditional. Not sure if it's my zsh or what...
Simply applying DeMorgan's Law to the expression (removing the '!' in the front by NOTing the entire thing) enabled me to use antigen fully.

So, I have a fork set up with the fix applied, but I wanted to query the opinions of the developers first.

* Do you think this is a problem on my end? Any ideas on what it could be? (I don't see any related issues)
* Is it feasible to
implement this fix? (Will it work on others' systems?)
* I haven't used other parts of the codebase which use this same syntax, but I assume they'll break on my system.

Thanks for taking the time to read this.
Regards,