@@ -123,34 +123,53 @@ jnv data.json
123
123
124
124
## Keymap
125
125
126
- | Key | Action
127
- | :- | :-
128
- | <kbd >Ctrl + C</kbd > | Exit ` jnv `
129
- | <kbd >Tab</kbd > | jq filter auto-completion
130
- | <kbd >←</kbd > | Move the cursor one character to the left
131
- | <kbd >→</kbd > | Move the cursor one character to the right
132
- | <kbd >Ctrl + A</kbd > | Move the cursor to the start of the filter
133
- | <kbd >Ctrl + E</kbd > | Move the cursor to the end of the filter
134
- | <kbd >Backspace</kbd > | Delete a character of filter at the cursor position
135
- | <kbd >Ctrl + U</kbd > | Delete all characters of filter
136
- | <kbd >↑</kbd >, <kbd >Ctrl + K</kbd > | Move the cursor one entry up in JSON viewer
137
- | <kbd >↓</kbd >, <kbd >Ctrl + J</kbd > | Move the cursor one entry down in JSON viewer
138
- | <kbd >Ctrl + H</kbd > | Move to the last entry in JSON viewer
139
- | <kbd >Ctrl + L</kbd > | Move to the first entry in JSON viewer
140
- | <kbd >Enter</kbd > | Toggle expand/collapse in JSON viewer
141
- | <kbd >Ctrl + P</kbd > | Expand all folds in JSON viewer
142
- | <kbd >Ctrl + N</kbd > | Collapse all folds in JSON viewer
143
- | <kbd >Alt + B</kbd > | Move the cursor to the previous nearest character within set(` . ` ,` \| ` ,` ( ` ,` ) ` ,` [ ` ,` ] ` )
144
- | <kbd >Alt + F</kbd > | Move the cursor to the next nearest character within set(` . ` ,` \| ` ,` ( ` ,` ) ` ,` [ ` ,` ] ` )
145
- | <kbd >Ctrl + W</kbd > | Erase to the previous nearest character within set(` . ` ,` \| ` ,` ( ` ,` ) ` ,` [ ` ,` ] ` )
146
- | <kbd >Alt + D</kbd > | Erase to the next nearest character within set(` . ` ,` \| ` ,` ( ` ,` ) ` ,` [ ` ,` ] ` )
147
- | <kbd >Ctrl + O</kbd > | Copy current JSON content to clipboard
148
- | <kbd >Ctrl + Q</kbd > | Copy current query to clipboard
126
+ | Key | Action |
127
+ | :- | :- |
128
+ | <kbd >Ctrl + C</kbd > | Exit |
129
+ | <kbd >Ctrl + Q</kbd > | Copy jq filter to clipboard |
130
+ | <kbd >Ctrl + O</kbd > | Copy JSON to clipboard |
131
+ | <kbd >Shift + ↑</kbd >, <kbd >Shift + ↓</kbd > | Switch to another mode |
132
+
133
+ ### Editor mode (default)
134
+
135
+ | Key | Action |
136
+ | :- | :- |
137
+ | <kbd >Tab</kbd > | Enter suggestion |
138
+ | <kbd >←</kbd > | Move cursor left |
139
+ | <kbd >→</kbd > | Move cursor right |
140
+ | <kbd >Ctrl + A</kbd > | Move cursor to line start |
141
+ | <kbd >Ctrl + E</kbd > | Move cursor to line end |
142
+ | <kbd >Backspace</kbd > | Delete character before cursor |
143
+ | <kbd >Ctrl + U</kbd > | Clear entire line |
144
+ | <kbd >Alt + B</kbd > | Move the cursor to the previous nearest character within set(` . ` ,` \| ` ,` ( ` ,` ) ` ,` [ ` ,` ] ` ) |
145
+ | <kbd >Alt + F</kbd > | Move the cursor to the next nearest character within set(` . ` ,` \| ` ,` ( ` ,` ) ` ,` [ ` ,` ] ` ) |
146
+ | <kbd >Ctrl + W</kbd > | Erase to the previous nearest character within set(` . ` ,` \| ` ,` ( ` ,` ) ` ,` [ ` ,` ] ` ) |
147
+ | <kbd >Alt + D</kbd > | Erase to the next nearest character within set(` . ` ,` \| ` ,` ( ` ,` ) ` ,` [ ` ,` ] ` ) |
148
+
149
+ #### Suggestion in Editor (after <kbd >Tab</kbd >)
150
+
151
+ | Key | Action |
152
+ | :- | :- |
153
+ | <kbd >Tab</kbd >, <kbd >↓</kbd > | Select next suggestion |
154
+ | <kbd >↑</kbd > | Select previous suggestion |
155
+ | Others | Return to editor |
156
+
157
+ ### JSON viewer mode
158
+
159
+ | Key | Action |
160
+ | :- | :- |
161
+ | <kbd >↑</kbd >, <kbd >Ctrl + K</kbd > | Move up |
162
+ | <kbd >↓</kbd >, <kbd >Ctrl + J</kbd > | Move down |
163
+ | <kbd >Ctrl + H</kbd > | Move to last entry |
164
+ | <kbd >Ctrl + L</kbd > | Move to first entry |
165
+ | <kbd >Enter</kbd > | Toggle fold |
166
+ | <kbd >Ctrl + P</kbd > | Expand all |
167
+ | <kbd >Ctrl + N</kbd > | Collapse all |
149
168
150
169
## Usage
151
170
152
171
``` bash
153
- JSON navigator and interactive filter leveraging jq
172
+ SON navigator and interactive filter leveraging jq
154
173
155
174
Usage: jnv [OPTIONS] [INPUT]
156
175
@@ -165,22 +184,13 @@ Arguments:
165
184
[INPUT] Optional path to a JSON file. If not provided or if " -" is specified, reads from standard input
166
185
167
186
Options:
168
- -e, --edit-mode < EDIT_MODE>
169
- Edit mode for the interface (' insert' or ' overwrite' ). [default: insert]
170
- -i, --indent < INDENT>
171
- Number of spaces used for indentation in the visualized data. [default: 2]
172
- -n, --no-hint
173
- Disables the display of hints.
174
- -d, --expand-depth < JSON_EXPAND_DEPTH>
175
- Initial depth to which JSON nodes are expanded in the visualization. [default: 3]
176
- -s, --limit-length < JSON_LIMIT_LENGTH>
177
- Limit length of JSON array in the visualization. [default: 50]
178
- -l, --suggestion-list-length < SUGGESTION_LIST_LENGTH>
179
- Number of suggestions visible in the list. [default: 3]
180
- -h, --help
181
- Print help (see more with ' --help' )
182
- -V, --version
183
- Print version
187
+ -e, --edit-mode < EDIT_MODE> Edit mode for the interface (' insert' or ' overwrite' ). [default: insert]
188
+ -i, --indent < INDENT> Number of spaces used for indentation in the visualized data. [default: 2]
189
+ -n, --no-hint Disables the display of hints.
190
+ --max-streams < MAX_STREAMS> Maximum number of JSON streams to display
191
+ --suggestions < SUGGESTIONS> Number of autocomplete suggestions to show [default: 3]
192
+ -h, --help Print help (see more with ' --help' )
193
+ -V, --version Print version
184
194
` ` `
185
195
186
196
# # Stargazers over time
0 commit comments