cantino / mcfly

Fly through your shell history. Great Scott!
MIT License
6.78k stars 177 forks source link

Option to change RUN, EDIT, DELETE keys #186

Closed hlascelles closed 2 years ago

hlascelles commented 2 years ago

I use mcfly a lot, thank you! One thing I am used to (from alternative history methods) is "ENTER to choose, but not run". I then either ENTER to choose or "double-tap ENTER" to invoke.

Also change delete from F2 to DEL.

Would that be possible?

hlascelles commented 2 years ago

Here is a working version that I am now using locally as a built binary. It is probably not idiomatic rust, and it has no tests, but you get the idea... https://github.com/hlascelles/mcfly/compare/master...use-editable-keymap

I run it with:

export MCFLY_DELETE_KEY=DELETE
export MCFLY_EDIT_KEY=ENTER

Should I continue and make a PR?

cantino commented 2 years ago

I think it'd be nice to eventually support arbitrary keymaps. I'm hesitant to add a one-off option that just remaps a couple keys, though.

hlascelles commented 2 years ago

Fair enough... I'll see if my branch eventually expands to cover more!