.\" Generated by scdoc 1.11.3 .\" Complete documentation for this program is not available as a GNU info page .ie \n(.g .ds Aq \(aq .el .ds Aq ' .nh .ad l .\" Begin generated content: .TH "ijq" "1" "2024-08-14" .PP .SH NAME .PP ijq - interactive jq .PP .SH SYNOPSIS .PP \fBijq\fR [\fB-cnsrRMSV\fR] [\fB-f\fR \fIfile\fR] [\fIfilter\fR] [\fIfiles .\&.\&.\&\fR] .PP .SH DESCRIPTION .PP \fBijq\fR is a near drop-in replacement for \fBjq\fR that allows you to interactively see the results of your filter as you construct it.\& .PP \fBijq\fR contains two panes and an input field: the left pane is the original, unmodified input data and the right pane contains the filtered output.\& When you are finished, press Return or Ctrl-C to exit.\& The filtered output will be written to standard output and the filter itself will be written to standard error.\& .PP \fBijq\fR maintains a history of used filters, unless disabled with the \fB-H\fR option.\& Delete all text in the filter field to browse any available history.\& .PP If \fIfiles\fR is omitted then \fBijq\fR reads data from standard input.\& .PP All of the options mirror their counterparts in \fBjq\fR.\& The options are: .PP \fB-c\fR .RS 4 Use compact instead of pretty-printed output.\& .PP .RE \fB-n\fR .RS 4 Don'\&t read any input.\& Useful for using \fBijq\fR as a calculator or to construct JSON data from scratch.\& .PP .RE \fB-s\fR .RS 4 Read all input into a single array and apply the given filter to it.\& .PP .RE \fB-r\fR .RS 4 If the filter output is a string it will be written directly to standard output rather than being formatted as a JSON string with quotes.\& Useful for using \fBijq\fR in a pipeline with other programs that expect normal string input.\& .PP .RE \fB-R\fR .RS 4 Don'\&t parse the input as JSON, instead passing each line of input to the filter as a string.\& If combined with \fB-s\fR then the entire input is passed to the filter as a single long string.\& .PP .RE \fB-M\fR .RS 4 Disable colored output.\& .PP .RE \fB-S\fR .RS 4 Output the fields of each object with the fields in sorted order.\& .PP .RE \fB-f\fR \fIfile\fR .RS 4 Read the filter from \fIfile\fR.\& When this option is used, all positional arguments (if any) are interpreted as input files.\& .PP .RE \fB-H\fR \fIfile\fR .RS 4 Specify the path to store history.\& If set to '\&'\& (-H '\&'\&), then history will not be captured.\& .PP .RE .SH KEY BINDINGS .PP \fBShift + Up\fR, \fBShift + Left\fR .RS 4 Focus the input (left) viewing pane.\& .PP .RE \fBShift + Right\fR .RS 4 Focus the output (right) viewing pane.\& .PP .RE \fBShift + Down\fR .RS 4 Focus the text input field.\& .PP .RE \fBTab\fR .RS 4 When the text input field has focus, navigate between the autocompletion list.\& When one of the viewing panes has focus, toggle between the different views.\& .PP .RE \fBShift-Tab\fR .RS 4 Like \fBTab\fR, but moves in the opposite direction.\& .PP .RE \fBCtrl-A\fR .RS 4 When the text input field has focus, move the cursor to the beginning of the input.\& When one of the viewing panes has focus, set the column offset to 0.\& .PP .RE \fBCtrl-E\fR .RS 4 When the text input field has focus, move the cursor to the end of the input.\& When one of the viewing panes has focus, set the column offset to view the longest visible line.\& .PP .RE \fBCtrl-F\fR .RS 4 When the text input field has focus, move the cursor one character forward.\& When one of the viewing panes has focus, scroll down one page.\& .PP .RE \fBCtrl-B\fR .RS 4 When the text input field has focus, move the cursor one character backward.\& When one of the viewing panes has focus, scroll up one page.\& .PP .RE \fBCtrl-D\fR .RS 4 When the text input field has focus, delete the character under the cursor.\& When one of the viewing panes has focus, scroll down one half page.\& .PP .RE \fBCtrl-U\fR .RS 4 When the text input field has focus, delete all of the text from the cursor to the beginning of the field.\& When one of the viewing panes has focus, scroll up one half page.\& .PP .RE \fBu\fR, \fBd\fR, \fBf\fR, \fBb\fR .RS 4 When one of the viewing panes has focus, scroll a half/full page up/down.\& .PP .RE \fBLeft\fR, \fBDown\fR, \fBUp\fR, \fBRight\fR \fBh\fR, \fBj\fR, \fBk\fR, \fBl\fR .RS 4 When one of the viewing panes has focus, move the view left/down/up/right.\& .PP .RE \fBReturn\fR .RS 4 Close \fBijq\fR.\& Write the contents of the output pane to stdout and the current input filter to stderr.\& The current input filter is also saved to the history file.\& .PP .RE \fBCtrl-C\fR .RS 4 Exit \fBijq\fR immediately, discarding all state.\& .PP .RE .SH DEMO .PP See https://asciinema.\&org/a/496932 for a demo.\& .PP .SH SEE ALSO .PP jq(1) .PP .SH BUGS AND CONTRIBUTING .PP Report bugs to https://todo.\&sr.\&ht/~gpanders/ijq (or send an email to ~gpanders/ijq@todo.\&sr.\&ht).\& .PP Patches can be sent to ~gpanders/ijq@lists.\&sr.\&ht.\& .PP .SH AUTHOR .PP Gregory Anders