antonmedv / fx

Terminal JSON viewer & processor
https://fx.wtf
MIT License
19.08k stars 438 forks source link

Add extra keybindings for completion #160

Closed CallumHoward closed 2 years ago

CallumHoward commented 3 years ago

Add Ctrl+p and Ctrl+n for choosing previous and next completion options. Updated documentation also.

antonmedv commented 3 years ago

Hi! Where you use such key bindings?

CallumHoward commented 3 years ago

Hello, it has the same as up and down arrows when the completion menu is shown (the code is also the same):

Screen Shot 2021-03-28 at 8 45 14 pm

These keybindings for selecting completion is the same as Vim, and for up and down action it is common in Emacs, readline, fzf, macOS and more.

Screen Shot 2021-03-28 at 8 49 57 pm
antonmedv commented 3 years ago

Got it! Let’s just remove code duplicates.

antonmedv commented 2 years ago

I rewrote the entire fx in golang. So I belove this PR is no longer actual.