-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Console] Consider adding an event that allow us intercept events #9538
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
Comments
The article mentioned was written be me - indeed it was not very straigh-forward to add an option to the application's input definition and get it parsed correctly at all times. The thing is: the input object which can be retrieved from a console event using I think it would be great to have a way to hook into the process of creating the application's input definition (maybe using something like "console application extensions"). And/or to make the |
@marcospassos Is this issue still relevant? How do you approach it now? |
This is now possible in 2.8/3.0, as #15938 is merged. See the test included in that PR on how to achieve this. |
Great! This issue can be closed then, right? |
Yes, @TomasVotruba. Thanks! |
@marcospassos Thank you |
When we were discussing about how introduce console events, I talked about the possibility of intercepting all events in order to include a new parameter. Now, using the
console.command
is possible to add such parameter but we can't retrieve its value.I think it can be achieved introducing a
pre
andpost
bound event, where in the first we have the opportunity to append a new option and in the second retrieve its value and perform some action.Seems like other users have the same use case and for now the only workaround is very ugly and not recommended.
The text was updated successfully, but these errors were encountered: