mattbrictson / bundle_update_interactive

A stylish interactive mode for Bundler, inspired by `yarn upgrade-interactive`
MIT License
137 stars 3 forks source link

Reevaluate usage of ctrl commands #16

Closed la-magra closed 1 month ago

la-magra commented 1 month ago

Hello, loving your project, you just perfectly solved a major usability issue of bundler.

Just 2 things, be aware that ctrl-a is a very popular tmux prefix key and will conflict with this command usage, and this is more of a nitpick but using ctrl-r on a command line util feels strange (it's reverse search).

I would propose switching to shift-a and shift-r or even just a and r.

mattbrictson commented 1 month ago

@la-magra thanks for the feedback! I am not a tmux user, so this issue is a blindspot for me.

Point taken on ctrl-r – I agree this is a weird choice given that this combination is very commonly used for reverse-search in readline.

For background, I am using ctrl-a and ctrl-r simply because these are the default key bindings provided by tty-prompt, which is the library I am using to render the multi-select menu. It seems like that library decided on ctrl-a and ctrl-r somewhat arbitrarily. See: https://github.com/piotrmurach/tty-prompt/issues/140

So I am definitely open to changing these.

It looks like yarn upgrade-interactive (where I have taken a lot of inspiration) uses just a and i without any modifier. What do you think of following that convention?

la-magra commented 1 month ago

In general using ctrl-anything on a command line util (and not taking over signal control) is just asking for trouble.

I would be OK with using all and invert (similar to yarn upgrade-interactive (the yarn 1.22.21 version. I have some... issues... with the yarn berry (4..) version)).

From an ergonomic standpoint perhaps reverse would be better, since everything is near your left hand while you use the arrow keys with the right.

Also, if I may, I got two requests (I'll open new issues if you want):

mattbrictson commented 1 month ago

Noted! I am leaning towards a and r for the reasons you mentioned.

Yes, please open new issues for the other enhancements. Regarding latest, there is some related discussion in #13 about somehow indicating gems that are being held back from their latest versions. I think your suggestion is probably complementary, but maybe there is a way to combine those features since they are serving similar goals.

Thanks again for the feedback!