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

incorrect ~/.bash_completion #6384

Closed
2 of 3 tasks
xkxixnxgx opened this issue Sep 3, 2022 · 3 comments
Closed
2 of 3 tasks

incorrect ~/.bash_completion #6384

xkxixnxgx opened this issue Sep 3, 2022 · 3 comments
Labels
kind/bug Something isn't working as expected status/duplicate Duplicate issues

Comments

@xkxixnxgx
Copy link

  • I am on the latest Poetry version.

  • I have searched the issues of this repo and believe that this is not a duplicate.

  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).

  • OS version and name: 5.18.0-kali5-amd64 (debian)

  • Poetry version: Poetry (version 1.2.0)

  • Link with the contents of your pyproject.toml file:

Issue

After installing Poetry, I executed the command according to the documentation to add tab completion .
https://python-poetry.org/docs/#auto-loaded-recommended

poetry completions bash >> ~/.bash_completion

When opening a new bash shell, an error message appears in ~/.bash_completion

bash: /home/user/.bash_completion: line 40: syntax error next to unexpected "clear" marker
bash: /home/user/.bash_completion: line 40: `            (cache clear)'

And so on all lines where the value in the lines consists of two words.

->        (debug info)
            opts="${opts} "
            ;;

->        (debug resolve)
            opts="${opts} --extras --install --python --tree"
            ;;

I wrapped such variables in quotes and the problem went away.

            ("debug info")
            opts="${opts} "
            ;;

            ("debug resolve")
            opts="${opts} --extras --install --python --tree"
            ;;

Tab completion works, but only for the first word.

@xkxixnxgx xkxixnxgx added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Sep 3, 2022
@dimbleby
Copy link
Contributor

dimbleby commented Sep 3, 2022

this comes from cleo so wants raising and fixing over there.

https://github.com/python-poetry/cleo/blob/efb274f445a939ee805f93ec7b8cd73cba5337e8/src/cleo/commands/completions_command.py#L165 I reckon, if you care to put together an MR

@neersighted neersighted added status/external-issue Issue is caused by external project (platform, dep, etc) and removed status/triage This issue needs to be triaged labels Sep 3, 2022
@dimbleby
Copy link
Contributor

dimbleby commented Sep 3, 2022

ah, duplicate #4572 (and per that issue, tracked upstream at python-poetry/cleo#133)

@neersighted neersighted added status/duplicate Duplicate issues and removed status/external-issue Issue is caused by external project (platform, dep, etc) labels Sep 3, 2022
@neersighted neersighted closed this as not planned Won't fix, can't repro, duplicate, stale Sep 3, 2022
Copy link

github-actions bot commented Mar 1, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected status/duplicate Duplicate issues
Projects
None yet
Development

No branches or pull requests

3 participants