-
Notifications
You must be signed in to change notification settings - Fork 94
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
Cd builtin #311
Cd builtin #311
Conversation
So in the ticket we are talking about making this builtin as failable but to be shellcheck validated we need to support the case that fails How we can handle that behavior? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow! Good job @Mte90! I appreciate that modifications to the contributor guide 👏👏. Now if you want to make this failable, you have to add these 3 lines of code. Can you also add some information about it to the contributing guide?
So now is failable but the test fails I can't use unsafe before |
I think we need also to add the |
good catch @MuhamedMagdi I updated in this PR the contributing guide. |
@Mte90 Can this PR stall until I change the API for TranslateModule? I'm talking about the solution that I proposed here: https://www.youtube.com/watch?v=_caXIMxrYj8 |
I'd say that this issue is stalled until this one is finished: #183 I'll do that one first so that we can move forward |
Sure the other one is more important |
Co-authored-by: Phoenix Himself <[email protected]>
Co-authored-by: Phoenix Himself <[email protected]>
Co-authored-by: Phoenix Himself <[email protected]>
@Ph0enixKM please review again |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just realized that you should also use Command Modifier to give ability to use the unsafe
(soon it will be assume
) keyword here.
To parse the command modifier, you need to parse the command and self.failed
in the command modifier context. Here is how it's done. You don't translate the command modifiers since they don't need to be translated.
Remember to use CommandModifier::new().parse_expr()
instead of just CommandModifier::new()
as the function will not make it look for expression (this should be simplified to CommandModifier::new()
though. I'll fix it once you update this PR)
Co-authored-by: Phoenix Himself <[email protected]>
Okay @Mte90 let's remove the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Following the new contributing guide I was able to add the
cd
builtin :-)I updated the guide a bit to be more clear.
Ref: #215