jmespath.terminal
jmespath.terminal copied to clipboard
Change window focus with a keyboard
There's an option to click into the Input JSON
window or JMESPath Result
window with a mouse so you can then scroll inside them. However, I cannot find a way to select the windows with a keyboard.
Also, the scrolling inside the windows only works with the arrow keys so it's weird that you cannot select the windows without the mouse.
This feature would be extremely useful. There could be something simple like Tab for cycling between the panels/windows:
[Tab]
> Expression[Tab]
> Input[Tab]
> Result[Tab]
...
Then for navigating in the input and result windows, there should be keyboard shortcuts, preferably the same ones used by the pagers less
or more
:
-
j
: down one line -
k
: up one line -
Ctrl-F
: down one page -
Ctrl-B
: up one page -
Ctrl-D
: down half a page -
Ctrl-U
: up half a page -
g
: go to beginning of document -
G
: go to end of document
Also, search functionality would be useful:
-
/
: search forward -
?
: search backward -
n
: go to next search match -
N
: go to previous search match
The expression line should also accept a richer set of line editing commands. For example, similar ones as used in a typical Bash command line:
-
Ctrl-A
: go to beginning of line -
Ctrl-E
: go to end of line -
Ctrl-U
: delete from cursor to beginning of line -
Ctrl-K
: delete from cursor to end of line -
Ctrl-W
: delete one word to the left of cursor -
Alt-B
: move cursor one word backward -
Alt-F
: move cursor one word forward -
Alt-D
: delete word to the right of cursor -
Alt-Del
: delete word to the left of cursor
Alternatively, there could also be a Vim mode for editing the expression line with Vim commands.