On Tue, 11 Nov 2014, Greg Reagle wrote:
> 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.

You are correct; this behaviour is defined in POSIX.1-2008 which fish aims 
to comply with for the test command.

`test -n "$SOMEVAR"` is the inverse of `test -z "$SOMEVAR"` - note the 
quotation marks which ensure there are two arguments.

David Adam
zanc...@ucc.gu.uwa.edu.au

------------------------------------------------------------------------------
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
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to