Closed richq closed 9 years ago
This is an issue with code generation. Currently it always emits "-eq" for "==" because it does not check the type of the operands. Should be fairly straightforward to fix.
Should be fixed with b40db23. Thanks for reporting the issue!
When using if, bish seems to always uses -eq for string comparisons. This makes it impossible (?) to compare strings. I wanted to write a "direxists" that made sure the dir arg wasn't empty, but couldn't do it:
produces:
But this gives an error:
line 7: [[: /dirname: syntax error: operand expected (error token is "/dirname")
. Line 7 is the if with -eq on it.