Skip to content

Commit

Permalink
bug #57853 [Console] Fix side-effects from running bash completions (…
Browse files Browse the repository at this point in the history
…Seldaek)

This PR was merged into the 5.4 branch.

Discussion
----------

[Console] Fix side-effects from running bash completions

| Q             | A
| ------------- | ---
| Branch?       | 5.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Issues        | Fix composer/composer#12015
| License       | MIT

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
symfony/symfony@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.

Commits
-------

5456645628 [Console] Fix side-effects from running bash completions
  • Loading branch information
nicolas-grekas committed Aug 13, 2024
2 parents f96ee2a + c24bcd0 commit e86f855
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Resources/completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

_sf_{{ COMMAND_NAME }}() {
# Use newline as only separator to allow space in completion values
IFS=$'\n'
local IFS=$'\n'
local sf_cmd="${COMP_WORDS[0]}"

# for an alias, get the real script behind it
Expand Down

0 comments on commit e86f855

Please sign in to comment.