Skip to content
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

Localize shell variable REPLY to avoid overwriting users' value #489

Merged
merged 1 commit into from
Jun 12, 2024

Conversation

akinomyoga
Copy link
Contributor

The shell function __python_argcomplete_scan_head in the completion setting (argcomplete/bash_completion.d/_python-argcomplete) uses the read builtin without specifying variable names. This stores the read result in the shell variable REPLY. Then, __python_argcomplete_scan_head checks the value of REPLY. A problem is that this will clobber the users' values of the global shell variable REPLY on an attempt of completion. We should declare the REPLY as a local variable in the shell function __python_argcomplete_scan_head.

@kislyuk kislyuk merged commit 80e5cb6 into kislyuk:develop Jun 12, 2024
22 checks passed
@kislyuk
Copy link
Owner

kislyuk commented Jun 12, 2024

Thanks!

@akinomyoga akinomyoga deleted the REPLY branch June 12, 2024 00:36
@akinomyoga
Copy link
Contributor Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants