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

add a command to switch to the most recent local version #110

Open
travisstaloch opened this issue Jan 30, 2024 · 4 comments · May be fixed by #117
Open

add a command to switch to the most recent local version #110

travisstaloch opened this issue Jan 30, 2024 · 4 comments · May be fixed by #117

Comments

@travisstaloch
Copy link

i would guess that i run $ zigup master maybe twice a month. its much more common that i switch between 0.11 and my most recent local version. to do so i need to run these commands:

$ zigup 0.11.0 # this is nice. one command to switch to 0.11

# later on when i want to switch back i need to run two commands, and paste the version into the second.

$ zigup list
0.11.0
0.12.0-dev.2341+92211135f

$ zigup 0.12.0-dev.2341+92211135f

this isn't bad but would be nice if there were a single command i could run. the only reason i bring it up is that its my most common usage of zigup. i wonder if this is possible?

this is what i'd like to be able to do.

$ zigup local-master # don't download anything. switch to local version 0.12.0-dev.2341+92211135f
@travisstaloch
Copy link
Author

this is my current 1 liner for switching to most recent local version.

alias zigup-latest="zigup $(zigup list 2>&1 | tail -1)"

seems to work but i don't know if zigup list is sorted in any way so i'm not sure if this is reliable.

@marler8997
Copy link
Owner

What about zigup latest? Since it's not associated with git maybe that makes it a bit more intuitive that it won't fetch the latest version first?

@travisstaloch
Copy link
Author

Yeah zigup latest sounds great. I don't really care too much about the command name, hopefully it ends up fairly easy to type.

Something i noticed about my zigup-latest bash alias is that i need to sort the output from zigup list since i noticed my latest zig version was appearing at the top of the list.

@travisstaloch
Copy link
Author

I'd be willing to work on this feature, but I haven't looked at this project recently and would appreciate any guidance you might have related to how it should work.

@travisstaloch travisstaloch linked a pull request Apr 3, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants