-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Console] Fix side-effects from running bash completions #57853
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
Conversation
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, great find!
# Use newline as only separator to allow space in completion values | ||
IFS=$'\n' |
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.
Can you try if local IFS=$'\n'
also fixes the issue?
Based on a quick local test, the behavior (being able to autocomplete values with spaces) still works when declaring it as a local variable.
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.
PR updated to your suggestion @wouterj
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.
Thanks for taking over sorry summer holidays here
0c8973b
to
61f042b
Compare
61f042b
to
5456645
Compare
Thank you @Seldaek. |
@nicolas-grekas @GromNaN what do you think about increasing the completion api version (e.g. from 1 to |
That would break completion for no reason until they update their completion script. The version check need to accept bugfix versions. But then I don't see how we can trigger a warning when the completion is run. |
Fixes issues in symfony bash completions having side-effects for other completions. See composer/composer#12015 for details.
I identified this IFS line as causing the issue.. But it was introduced here
e9e0c07 (cc @GromNaN) probably for a good reason. So I don't think this is mergeable as is, but we should see what can be done to set IFS where needed per process call and not change it globally like that.