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

bug: asdf v0.16.2 tab completion errors out with "too many arguments" #1962

Open
vmartell22 opened this issue Feb 16, 2025 · 2 comments
Open
Labels

Comments

@vmartell22
Copy link

vmartell22 commented Feb 16, 2025

Describe the Bug

asdf v0.16.2 completion generation leaves out single quotes for -a parameter, causing completions to error out

vmartell@the-gibson ~/.c/f/completions> asdf complete: too many arguments

~/.config/fish/completions/asdf.fish (line 67): 
complete -f -c asdf -n __fish_asdf_needs_command -a plugin list all -d "List all existing plugins"
^
from sourcing file ~/.config/fish/completions/asdf.fish

Steps to Reproduce

1.- In a box running Ubuntu 24.04 and the fish shell 3.7.1 install asdf 0.16.2 from release github
2. Generate completions : asdf completion fish > ~/.config/fish/completions/asdf.fish
3. Do asdf <tab> Error above displays for multiple completion definitions

vmartell@the-gibson ~/.c/f/completions> asdf complete: too many arguments

~/.config/fish/completions/asdf.fish (line 67): 
complete -f -c asdf -n __fish_asdf_needs_command -a plugin list all -d "List all existing plugins"
^
from sourcing file ~/.config/fish/completions/asdf.fish

Went into the completions file ~/.config/fish/completions/asdf.fish and noticed that the -a parameter was missing quotes for the entries with multiple strings. For example, line 58 shows -a plugin add - changing to -a 'plugin add'
(notice the single quotes) clears the error for that line.

Expected Behaviour

Completion of commands

Actual Behaviour

vmartell@the-gibson ~/.c/f/completions> asdf complete: too many arguments

~/.config/fish/completions/asdf.fish (line 67): 
complete -f -c asdf -n __fish_asdf_needs_command -a plugin list all -d "List all existing plugins"
^
from sourcing file ~/.config/fish/completions/asdf.fish

Environment

vmartell@the-gibson ~/.c/f/completions> asdf info
OS:
Linux the-gibson 6.11.0-17-generic #17~24.04.2-Ubuntu SMP PREEMPT_DYNAMIC Mon Jan 20 22:48:29 UTC 2 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.2

ASDF INTERNAL VARIABLES:
ASDF_DEFAULT_TOOL_VERSIONS_FILENAME=.tool-versions
ASDF_DATA_DIR=/home/vmartell/.asdf
ASDF_CONFIG_FILE=/home/vmartell/.asdfrc

ASDF INSTALLED PLUGINS:
direnv    https://github.com/asdf-community/asdf-direnv.git 951acd38bf9aa2258a00a5d87cc9d971fd344a60

asdf plugins affected (if relevant)

direnv

@vmartell22 vmartell22 added the bug label Feb 16, 2025
@vmartell22 vmartell22 changed the title bug: asdf v0.16.2 tab completion errors out bug: asdf v0.16.2 tab completion errors out with "too many arguments" Feb 16, 2025
@Stratus3D
Copy link
Member

Hi @vmartell22 can you upgrade to asdf v0.16.3 and see that fixes this issue? I do not have a problem on latest master.

@vmartell22
Copy link
Author

vmartell22 commented Feb 19, 2025

Hi @vmartell22 can you upgrade to asdf v0.16.3 and see that fixes this issue? I do not have a problem on latest master.

Will try over the weekend - it looked to me like v0.16.2 was the latest at the time I tried this. Will confirm - Hope I did not report a resolved bug on an old version - if I did, apologies

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

No branches or pull requests

2 participants