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: uninstall prompt when no version is specified #180

Merged
merged 1 commit into from
Jan 17, 2024

Conversation

guilhas07
Copy link
Contributor

Problem

When there are multiple versions of neovim installed e.g., multiple nightly rollbacks, it can be easier to have a prompt
so the user can select which versions he wants to uninstall without having to type them one by one. It can also be used for normal uninstalls, which can be helpfull too.

Proposal

This commit adds a multiselect prompt with all versions that aren't in use when bob uninstall is run without arguments:

After selection, it confirms the user's choice and uninstalls the selected neovim versions:

Thank you very much for this project! This is my first time writing rust so if there are somethings that should be changed please let me know and I will corrected them asap.

@MordechaiHadad
Copy link
Owner

MordechaiHadad commented Jan 17, 2024

Does it work only for stable versions or also hashes and rollbacks?
EDIT: Looks like it does

is there a visual indicator for the selected versions?

@guilhas07
Copy link
Contributor Author

Yes there is. The arrow turns green when the version is selected.

@MordechaiHadad
Copy link
Owner

Yes there is. The arrow turns green when the version is selected.

Alright I'll test this, also fix the clippy errors and u good.

@MordechaiHadad
Copy link
Owner

Hmm doesn't seem like it actually changes color of the arrow for the first 3 versions:
image
image

@guilhas07
Copy link
Contributor Author

guilhas07 commented Jan 17, 2024

Alright I'll test this, also fix the clippy errors and u good.

Fixed the clippy issues.

Hmm doesn't seem like it actually changes color of the arrow for the first 3 versions

Weird on my end it does. Will test this on wsl too
EDIT: I have the same issue on wsl.
EDIT2: Seems to be related to windows terminal. On other terminals the same "bug" doesn't occur.

@MordechaiHadad
Copy link
Owner

I'll open an issue on their repo, maybe there is something they can do to fix that if at all.

@guilhas07
Copy link
Contributor Author

I'll open an issue on their repo, maybe there is something they can do to fix that if at all.

I think windows terminal is rendering the heavy check mark as an emoji microsoft/terminal#12537

In the meantime, changing the theme to use a normal check mark works:
image

@MordechaiHadad
Copy link
Owner

I'll open an issue on their repo, maybe there is something they can do to fix that if at all.

I think windows terminal is rendering the heavy check mark as an emoji microsoft/terminal#12537

In the meantime, changing the theme to use a normal check mark works: image

Add this to FAQ section on how to get it working on windows terminal

@guilhas07
Copy link
Contributor Author

Add this to FAQ section on how to get it working on windows terminal

I just pushed with the custom theme with a normal check mark. Now it works for both cases.

I also added a check to prevent triggering an error when an empty list was passed to multiselect.

@MordechaiHadad
Copy link
Owner

Looks good!

@MordechaiHadad MordechaiHadad merged commit bd3d169 into MordechaiHadad:master Jan 17, 2024
16 of 17 checks passed
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 this pull request may close these issues.

2 participants