Commit Graph
43 Commits
Author SHA1 Message Date
Nicolas Williams 77936a594d Add -I / --online-input for huge top-level arrays 2013-12-04 18:21:41 -06:00
Nicolas Williams d018e43ddc Add -e | --exit-status CLI option 2013-12-04 18:21:40 -06:00
Stephen Dolan 6a401c8262 Add a --unbuffered option. Closes #206 2013-11-08 12:21:45 +00:00
Stephen Dolan 8c2e228c74 Fix the jv_parser interface. 2013-06-23 12:26:49 +01:00
Stephen Dolan f44ecf3872 Remove Autoconf-generated config.h. 2013-06-23 12:01:58 +01:00
Nicolas Williams 298b2a6033 Add libjq autoconf goo 2013-06-21 11:57:12 -05:00
Nicolas Williams 3216d7683a Fix serious bug in handling of --argfile 2013-06-18 19:05:52 -05:00
Nicolas Williams 0ed6347d47 Allow --run-tests to take a file argument 2013-06-15 17:37:15 -05:00
Nicolas Williams 3f86e97f70 Fixup API to get closer to a libjq 2013-06-15 17:37:15 -05:00
Nicolas Williams bbf4e05fde Move slurp_file() into library as jv_load_file()
Needed as part of creating a libjq.
2013-06-15 00:08:59 -05:00
Stephen Dolan 5dac485458 Make jq --version print to stdout, not stderr 2013-06-03 23:22:59 +01:00
Stephen Dolan cc8761dbde Add command-line option to sort object keys.
Closes #79.
2013-06-03 23:12:31 +01:00
Stephen Dolan dcf1ac0d1f Merge pull request #135 from 13ren/locfile_bugfix
Locfile bugfix
2013-05-29 03:38:15 -07:00
Brendan Macmillan 40378a18f7 locfile.h -> locfile.h + locfile.c
clean up includes of a few files
2013-05-29 15:17:01 +10:00
Brendan Macmillan 6e373942e5 Load library from ~/.jq 2013-05-29 15:05:40 +10:00
Stephen Dolan f0b982795c Make jq --version report an actual git revision.
Closes #129.
2013-05-24 23:35:38 +01:00
Nicolas Williams 03598bb5d6 Add --argfile variant of --arg (issue #117)
This is useful when one has a database (in JSON form) to query using jq
input data.

    % echo '{"a":1, "c":5}' > db.json
    % echo '"c"'|./jq --argfile f /tmp/a '$f[.]'
    5
    % echo '"a"'|./jq --argfile f /tmp/a '$f[.]'
    1
    % echo '"b"'|./jq --argfile f /tmp/a '$f[.]'
    null
    %
2013-05-23 13:52:06 -05:00
Stephen Dolan e83e51eb56 'length' function now measures string length in codepoints, not bytes. 2013-05-15 00:37:38 +01:00
Stephen Dolan a47cfa4757 Delete unnecessary _POSIX_SOURCE. Closes #89 2013-05-13 16:41:11 +01:00
Stephen Dolan a511d03d85 Configure whether colour is displayed by default directly in source 2013-05-08 19:37:12 +01:00
Stephen Dolan 2363246eea Merge remote-tracking branch 'stagrlee/master' into autotools
Conflicts:
	Makefile
	jq_test.c
2013-05-08 00:52:24 +01:00
Nicolas Williams 65deaaacf5 Fix #111: exit(1) when inputs are not valid JSON 2013-05-06 12:36:53 -05:00
Stephen Dolan 5be97463ec Add a --arg option to allow variables to be passed from the cmdline.
Closes #107
2013-05-06 14:21:00 +01:00
Stephen Dolan 1741d8c161 Remove JQ_DEBUG #define and jq_test binary, simplifying build.
The debugging features previously available via JQ_DEBUG are now
command-line options.
2013-05-05 23:12:10 +01:00
Stephen Dolan c1748fa633 WIP 2013-05-05 22:59:53 +01:00
Stephen Dolan a49402c53a Combine the functionality of jq and jq_test
One binary is much simpler. ./jq --run-tests now runs the tests.
2013-05-05 22:59:53 +01:00
Nicolas Williams 312ab754a2 Remove unnecessary #includes 2013-04-28 20:12:15 -05:00
Nicolas Williams 87e9c64003 Remove globals/make jq_init/next/teardown() an API 2013-04-28 18:46:21 -05:00
Lee Thompson c7725a8d4d merging upstream stedolan changes 2013-02-02 20:39:23 -06:00
Stephen Dolan 52db8000c6 Fix an embarassing I/O bug.
Pulling some I/O out to a function meant that buf changed from
"char buf[4096]" to "char* buf", and "sizeof(buf)" got a lot
less interesting. The upshot of this is that jq read input eight
bytes at a time, which is not the fastest.
2012-12-27 01:57:09 +00:00
Stephen Dolan 0fed03f35a Fix a bad memory leak when using --raw-output 2012-12-23 15:41:20 +00:00
Stephen Dolan c85d8d8b4e Don't enable coloured output by default on Windows. 2012-12-20 12:16:22 +00:00
Stephen Dolan 04daafbde3 Add wrappers for malloc/realloc/free. See #43. 2012-12-18 16:53:51 +00:00
Stephen Dolan 75421cbfe3 Add the ability to specify input files on the commandline.
See #21.
2012-12-16 19:46:41 +00:00
Stephen Dolan e9c7548b82 Oh alright then, if you insist.
Colo(u)red output for jq. Enabled by default if isatty(stdout).
Closes #11.
2012-12-03 01:21:07 +00:00
Lee Thompson 006357f954 initial attempt at autoconf implementation, removed all generated code from git 2012-11-27 16:02:59 -06:00
Stephen Dolan 48fb7c61b3 Support a -f option to load from a file, and # comments
This means '#!/usr/local/bin/jq -f' is now a sensible way
to start a file.

Closes #13
2012-10-22 19:18:30 +01:00
Stephen Dolan f2601ab4f0 Fix logic for "slurp" option. Fixes #18 2012-10-22 18:55:56 +01:00
Stephen Dolan c53e001973 Version number tracking. 2012-10-21 23:26:31 +01:00
Stephen Dolan 359d5f33bd Add a bunch of commandline options for controlling I/O format.
Also docs for the above. Closes #1.
2012-09-20 19:31:14 +01:00
Stephen Dolan 305059ff9f Usage messages if jq is run with no arguments.
Beats segfaulting.
2012-09-18 23:37:46 +01:00
Stephen Dolan 20e45f363c Separate the tests and the main program. 2012-09-18 22:17:13 +01:00
Stephen Dolan a4eea165bb Move everything around - delete old Haskell code, clean up build. 2012-09-18 17:44:43 +01:00