~gpanders/ijq

ref: efc87bc84a8d0c16f1617680a108be3ab85a2482 ijq/ijq.1.scd -rw-r--r-- 1.8 KiB
efc87bc8Gregory Anders Swap input and output view positions 10 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
ijq(1)

# NAME

ijq - interactive jq

# SYNOPSIS

*ijq* [*-cnsrRMSV*] [*-f* _file_] [_filter_] [_files ..._]

# DESCRIPTION

*ijq* is a near drop-in replacement for *jq* that allows you to interactively
see the results of your filter as you construct it.

*ijq* contains two panes and an input field: the left pane is the output result
of the provided filter and the right pane contains the original, unmodified
input data. When you are finished, press Return or Ctrl-C to exit. The filtered
output will be written to standard output and your filter will be written to
standard error.

If _files_ is omitted then *ijq* reads data from standard input.

All of the options mirror the options from *jq*. The options are:

*-c*
	Use compact instead of pretty-printed output.

*-n*
	Don't read any input. Useful for using *ijq* as a calculator or to
	construct JSON data from scratch.

*-s*
	Read all input into a single array and apply the given filter to it.

*-r*
	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 *ijq* in a pipeline with other programs that expect normal
	string input.

*-R*
	Don't parse the input as JSON, instead passing each line of input to the
	filter as a string. If combined with *-s* then the entire input is
	passed to the filter as a single long string.

*-M*
	Disable colored output.

*-S*
	Output the fields of each object with the fields in sorted order.

*-f* _file_
	Read the filter from _file_. When this option is used, all positional
	arguments (if any) are interpreted as input files.

# DEMO

See https://asciinema.org/a/333292 for a demo.

# SEE ALSO

jq(1)

# BUGS AND CONTRIBUTING

Send pathces and bug reports to ~gpanders/public-inbox@lists.sr.ht.

# AUTHOR

Gregory Anders <greg@gpanders.com>