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

bash: compopt not supported in custom complete-functions #77

Open
NiklasReisser opened this issue Jun 8, 2022 · 1 comment · May be fixed by #78
Open

bash: compopt not supported in custom complete-functions #77

NiklasReisser opened this issue Jun 8, 2022 · 1 comment · May be fixed by #78
Assignees
Labels
enhancement New feature or request shell-bash

Comments

@NiklasReisser
Copy link

Hi,

I found that I can't use compopt (e.g. to set -o nospace) in custom bash completion functions.

This is due to the function in question being executed in a subshell.

It would be great to support this.

The easiest and most stable solution seems to be to write to a tmpfile and read that back in the next step.
I'll open a PR for this, but I am also happy to discuss other solutions!

Thanks in advance!

@NiklasReisser NiklasReisser linked a pull request Jun 8, 2022 that will close this issue
@NiklasReisser
Copy link
Author

(Not really sure whats up the Sourcery Refactored PR - never used Sourcery before.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request shell-bash
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants