crush icon indicating copy to clipboard operation
crush copied to clipboard

EditMode Support?

Open jeremyjh opened this issue 4 years ago • 2 comments

Hi, it doesn't look like this yet support's changing rustyline's EditMode. I really like vi bindings in my shell and would love to see that in crush. I'm willing to take a crack at implementing if I can get some guidance on how such options should be specified by the user, e.g. what should be the equivalent command to bindkey -v from ZSH?

jeremyjh avatar Aug 07 '20 13:08 jeremyjh

Excellent question. Of the top of my head, it feels like configuring the editor should be it's own namespace, e.g editor, so re-doing a key binding could be something like editor:bind key=XX action=YY. Switching between emacs-mode and vi-mode would then be something like editor:mode "vi".

liljencrantz avatar Aug 09 '20 23:08 liljencrantz

Added a very short and WIP-y intro to hacking Crush.

https://github.com/liljencrantz/crush/blob/master/docs/hacking.md

Please add to it. Or, when you're not sure what to add, let me know and I'll do my best, but I've found that documentation is often better when written by someone who is on the journey of finding information - they know better what the actually hard parts are. :-)

liljencrantz avatar Aug 10 '20 00:08 liljencrantz