That's very interesting. I get the same problem. I don't think
anything is wrong with your code. I think something fishy is going on
with fish, but I don't know what. It looks like it might even be a bug
in fish. I would expect test -n to be the opposite of test -z, but that
is not true sometimes.
There are a few workarounds.
I find that test -z works fine.
Another way to test a variable is
if test ab"$variable"cd = abcd; echo zero; else; echo non-zero; end
--
http://www.fastmail.fm - Access all of your messages and folders
wherever you are
------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users