kevincobain2000 / gobrew

Go version manager, written in Go. Super simple tool to install and manage Go versions. Install go without root. Gobrew doesn't require shell rehash.
https://medium.com/web-developer/go-version-manager-gobrew-c8750157dfe6
MIT License
380 stars 27 forks source link

Give interactive, uninstall #214

Open kevincobain2000 opened 2 days ago

kevincobain2000 commented 2 days ago

ASIS

╰─$ gobrew uninstall
[Error] No version provided

TOBE

╰─$ gobrew uninstall
1.22.0
1.22.3  ◀ (INTERACTIVE)
1.22.8
1.22.9
1.23.0
1.23.1
1.23.3*
Are you sure you want to remove y/N?

Similar for install

ASIS

╰─$ gobrew install
[Error] No version provided
gobrew install
latest
dev-latest  ◀ (INTERACTIVE)
Provide a version: 
juev commented 1 day ago

What if I need to uninstall multiple versions at once? Will I have to run uninstall for each version? Now I like how Prune works. Its leaves only one version, which is used now.

The idea of making a separate uninstall is interesting. But we need to think about how to implement it correctly.

kevincobain2000 commented 1 day ago

Good point In that case the interface should be a multiselect.

gobrew uninstall
[ ] select all
[x] 1.22.0
[x] 1.22.3
[x] 1.22.8
[ ] 1.22.9
[x] 1.23.0
[ ] 1.23.1
1.23.3*

Note that there are no changes to existing gobrew uninstall <version> and gobrew prune

kevincobain2000 commented 1 day ago

The idea of making a separate uninstall is interesting.

Not a separate uninstall, but more like, current gobrew uninstall can still be interactive when user doesn't give any version specifically.

juev commented 1 day ago

I didn't say it right, I meant a separate implementation of interactive user interaction. I really like the multi-select option!