On Tue, Nov 11, 2014, at 05:51 PM, Glenn Jackman wrote: > I suspect what is happening (this is true in bash, I'm speculating about > fish) is that an unset variable is substituted with nothing (not the > empty > string, but with nothing). Then the `test` command receives exactly one > argument: "-n". When `test` is given a single argument, the result is > true > if that argument is not empty. This is true for the string "-n".
Very astute. I confirmed that /usr/bin/test (for me, GNU coreutils) has the same behavior in this case as the builtin test. -- http://www.fastmail.fm - Email service worth paying for. Try it for free ------------------------------------------------------------------------------ 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