marwanhawari / stew

🥘 An independent package manager for compiled binaries.
MIT License
193 stars 14 forks source link

[Proposal] Add keys shortcut in stew search to open selected repository in browser #11

Closed edshamis closed 7 months ago

edshamis commented 2 years ago

When we run stew search, it could be beneficial to have an ability to press, for example, Ctrl-o to jump to repo's page for more details. What do you think?

marwanhawari commented 2 years ago

Yeah that's a great idea! However, it doesn't look like I can add custom key bindings with survey (the UI library that I'm using). I'm generally happy with this UI library because it's simple, looks good, and it's easy to use - so it's unlikely that I'll switch to a different UI library.

Some issues I've faced with it are: it's difficult to write tests, it's apparently broken on git bash for Windows (https://github.com/AlecAivazis/survey/issues/148), and it has limited extensibility. Something like bubbletea seems neat but it's probably overkill because all I really need are a confirmation prompt, an input prompt, and a selection UI - but if somebody wants to give it a shot, I'm open to PRs.

edshamis commented 2 years ago

Maybe fzf can help as a selecter?

marwanhawari commented 11 months ago

Welp, it looks like survey is no longer maintained and charm just released huh, which is their prompt UI library. It addresses all of my concerns: it's testable, will work with Windows, and - given charm's reputation - will likely be more extensible than survey. Guess it's time for an upgrade.

Sadly, custom key actions aren't a feature just yet. But... huh was literally released last week, so I have high hopes.

marwanhawari commented 7 months ago

Closing for now since this functionality isn't yet possible with huh