-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for regex and =~
operator
#250
Comments
that's not an feature that is amber's responsibility to implement. bash's if (command with args); then
echo the command's exit code was 0;
fi therefore to do this in amber correctly, you need to do this:
|
|
We could add Regex to standard library |
A line of code:
Generate:
That fails in bash |
This is right:
that generates:
The problem is that doens't return anything so the check is always true. Instead should generate a code like:
In this way works |
I suggest for regex to use grep that works everywhere and will avoid the situation I mentioned. |
I am not sure if #453 fix this ticket as is a stdlib implementation |
Bash example:
Source: https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html#Conditional-Constructs
Is there a way or plan to implement this with Amber?
The following code:
Does not compile:
Using Amber 0.3.3-alpha
The text was updated successfully, but these errors were encountered: