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

feat: add interactive selection for tasks if task was not found #1459

Merged
merged 1 commit into from
Jan 14, 2024

Conversation

roele
Copy link
Contributor

@roele roele commented Jan 14, 2024

Adds an interactive task selector as mentioned in #1274.

  • adds cask inquire
  • replaces task not found error with interactive selection of available tasks

Did not find an easy way to test this. Not sure if theres an easy way send user input to the console.

@roele roele marked this pull request as ready for review January 14, 2024 10:31
Cargo.toml Outdated
@@ -63,6 +63,7 @@ indenter = "0.3"
indexmap = { version = "2", features = ["serde"] }
indicatif = { version = "0.17", features = ["default", "improved_unicode"] }
indoc = "<3"
inquire = { version = "0.6.2", default-features = false, features = ["console"] }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this is the right choice or if console-rs/dialoguer would be a better one

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use demand, you can see an example with mise up --interactive

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thought i've seen something interactive somewhere but couldn't find it anymore. thanks for the hint!

@jdx
Copy link
Owner

jdx commented Jan 14, 2024

wow does it work? it's crazy how little code that was

@jdx
Copy link
Owner

jdx commented Jan 14, 2024

nice, it works great!
Screenshot 2024-01-14 at 07 48 54

I saw you filed a bug on demand which isn't too surprising, it hasn't been used that much yet but I think it's got a lot of promise. I wasn't very happy with inquirer

@jdx jdx merged commit 6a93748 into jdx:main Jan 14, 2024
7 checks passed
@roele
Copy link
Contributor Author

roele commented Jan 14, 2024

Yeah was surpised too how easy this was. The issue in demand is probably an edge-case which i ran into because i used the terminal in my IDE with aprox. 5 rows height only.

@roele roele deleted the issue/1274 branch January 14, 2024 14:01
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.

None yet

2 participants