Skip to content

bug: [0.16.0] Completion bash using old hyphenated commands #1867

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

Closed
jn-jairo opened this issue Feb 1, 2025 · 6 comments · Fixed by #1886
Closed

bug: [0.16.0] Completion bash using old hyphenated commands #1867

jn-jairo opened this issue Feb 1, 2025 · 6 comments · Fixed by #1886
Labels

Comments

@jn-jairo
Copy link
Contributor

jn-jairo commented Feb 1, 2025

Describe the Bug

The completion bash is using the old hyphenated commands which produces wrong completions.

Steps to Reproduce

I'm using this to set up shell completions.

. <(asdf completion bash)

The wrong commands in the completion script produce the wrong completions like in this line of the completion script:

plugins=$(asdf plugin-list 2>/dev/null | tr '\n' ' ')

The asdf plugin-list outputs the help instead of the list of plugins, so it lists the words from the help text instead of the plugins.

The other commands also need to be fixed.

Expected Behaviour

Correct completions.

Actual Behaviour

Wrong completions.

Environment

OS:
Linux notebook 6.8.0-52-generic #53-Ubuntu SMP PREEMPT_DYNAMIC Sat Jan 11 00:06:25 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

SHELL:
GNU bash, version 5.2.21(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

BASH VERSION:
5.2.21(1)-release

ASDF VERSION:
v0.16.0

asdf plugins affected (if relevant)

No response

@jn-jairo jn-jairo added the bug label Feb 1, 2025
@dchenbecker
Copy link

This also impacts zsh

@dchenbecker
Copy link

Also, a related issue is #1748

@ilyachch
Copy link

ilyachch commented Feb 3, 2025

Also impacts Fish.
And, as I can see, if type asdf list <tab>, it will output part of help:

ilyachch@Thinkpad ~> asdf list all
                                        add a Git repo as a plugin by
                                        begins with the given string
                                        default branch
                                        default branch or a particular git-ref
                                        directory.
                                        environment used for command shim execution.
                                        git urls and git-ref
                                        in the .tool-versions file
                                        install the latest stable version that

Image

@Stratus3D
Copy link
Member

I won't be able to get to this this week. Contributions are welcome here.

@xeron
Copy link

xeron commented Feb 5, 2025

Another issue is autocomplete for plugins doesn't work, e.g. asdf unins<tab> autocompletes to asdf uninstall but asdf uninstall pyth<tab> doesn't autocomplete. This used to work in older versions.

@matan129
Copy link

matan129 commented Feb 6, 2025

Hi, this still happens with fish shell 🙏 Can you reopen? cc @Stratus3D

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

Successfully merging a pull request may close this issue.

6 participants