You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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.
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.The text was updated successfully, but these errors were encountered: