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

Streamline switching between asdf versions (asdf update <ref>, asdf update --interactive) #1599

Closed
hyperupcall opened this issue Jul 14, 2023 · 0 comments

Comments

@hyperupcall
Copy link
Contributor

hyperupcall commented Jul 14, 2023

Is your feature request related to a problem? Please describe

Right now, there are two ways to update asdf:

  • asdf update
  • asdf update --head

The former updates to the latest stable. The latter updates to the latest, period.

It's difficult to "update" (switch) to a particular version of asdf.

Describe the proposed solution

I propose adding support for (1) an --interactive flag to asdf update and (2) a git ref as the first positional parameter

(2)

The first step is the first step. Should support things like tags, commits, and HEAD. Later, it may be nice to support remote branch names, but that is not necessary right away.

(1)

Flag --interactive simply shows a "scrollable" list of all current release tags and allows one to be selected.

I've made such scrollable lists before and I know how to make a readable and maintainable implementation. It has to be implemented using the bash-term library since tput is wayyy too slow (copying the source files, no package manager). bash-term is over a year old and is stable.

On this selection screen, it may be useful to show which versions have asdf update --interactive. Or, maybe only versions that implement --interactive should be shown (that way, there is not frusterating when switching to a version without asdf update --interactive).

Describe similar asdf features and why they are not sufficient

asdf update --head is similar

Describe other workarounds you've considered

Something like (cd "${ASDF_DIR:-"$HOME/.asdf"}" && git switch <ref> ) is too clunky and not interactive.

@hyperupcall hyperupcall closed this as not planned Won't fix, can't repro, duplicate, stale Feb 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant