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

Enhance Tab Completion for asdf global (or local) Command #1795

Open
erie0210 opened this issue Nov 3, 2024 · 1 comment
Open

Enhance Tab Completion for asdf global (or local) Command #1795

erie0210 opened this issue Nov 3, 2024 · 1 comment

Comments

@erie0210
Copy link

erie0210 commented Nov 3, 2024

Is your feature request related to a problem? Please describe

When trying to set a certain version of a tool using the asdf global/local command, it can be cumbersome to recall the exact versions that are already installed. Users need to type out the version manually or refer to other commands, which interrupts the workflow. This feature would help streamline the process and reduce friction by providing tab-completion for installed versions directly within the command.

Describe the proposed solution

I propose adding tab-completion functionality to the asdf global/local command so that when a user types asdf global /local (e.g., asdf global nodejs) and presses the tab key, the command line interface shows a list of installed versions of the specified tool. This feature would allow users to quickly view and complete the command with an available version, enhancing the usability and efficiency of the tool.

Describe similar asdf features and why they are not sufficient

While asdf list allows users to see installed versions, this requires running an additional command and copying the desired version manually. Existing tab-completion functionality for some asdf commands (e.g., asdf plugin-add) does not extend to version-specific completions, making it less helpful when setting global or local versions.

Describe other workarounds you've considered

Manually running asdf list and copying the version.

Using third-party shell extensions or scripts that partially automate version selection.

However, these workarounds still involve more steps and disrupt the user's flow compared to having integrated tab-completion support directly within the asdf global command.

@Stratus3D
Copy link
Member

PR welcome @erie0210. I'm in the middle of a complete rewrite of this project to Go (PR #1805) but the rewrite should not have much affect on the tab completion code.

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

No branches or pull requests

2 participants