1
1
mirror of https://github.com/wader/fq.git synced 2024-11-26 10:33:53 +03:00
Commit Graph

23 Commits

Author SHA1 Message Date
Mattias Wadman
1ddea1ada3 interp,format: Refactor registry usage and use function helpers
Move registry to interp and add support for functions and filesystems.
This will be used later for allow formats to add own functions and fq code.

Add gojqextra function helpers to have more comfortable API to add functions.
Takes care of argument type casting and JQValue:s and some more things.

Refactor interp package to use new function helper and registry. Probably
fixes a bunch of JQValue bugs and other type errors.

Refactor out some mpeg nal things to mpeg format.

Refactor interp jq code into display.q and init.jq.

Remove undocumented aes_ctr funciton, was a test. Hopefully will add more crypto things laster.
2022-07-16 19:24:13 +02:00
Mattias Wadman
9cb4b57a45 interp,cli: Handle ctrl-c properly
Should supress cancel error message
Add CLI ctlr-c/ctrl-d tests and make them more robust
2022-03-15 22:38:12 +01:00
Mattias Wadman
41551de331 interp,repl: Improved eval and output interrupt
repl now rewrites query to do implicit display inside the sub eval.
This makes it possible to interrupt eval and output in a better and faster way.

Make JSON encoder fail early on errors.

Add more interrupt tests.
2022-03-11 16:22:30 +01:00
Mattias Wadman
6f10745aa5 interp: Fix interrupt regression after query rewrite refactor
Also add test for it
2022-03-11 12:41:49 +01:00
Mattias Wadman
56ae4a0c70 test: Make expect cli test more robust
Wait for prompt before sending ^D. Seems to fix issue with expect on ubuntu focal.

Thanks @KristianKarl for report
2022-03-07 16:22:41 +01:00
Mattias Wadman
48a19cb82c interp: Add paste function to allow pasting text into REPL etc
Also refactor readline and eval args into option struct and partinally start
addressing some side effects during completion.
2022-02-11 17:59:06 +01:00
Mattias Wadman
ca68e6a1e4 interp: Add Platform() method to OS interface
Felt bad that main should have to know about it
2022-01-29 11:31:36 +01:00
Mattias Wadman
233d86a384 fq: Add arch and os to --version 2022-01-26 18:09:59 +01:00
Mattias Wadman
6034ad7d67 interp: More sure stdOS stops the signal forward gorutine 2021-11-25 13:35:20 +01:00
Mattias Wadman
ffb5adff1d registry: Move to pkg/registry, feels better 2021-11-18 01:22:21 +01:00
Mattias Wadman
986d5ecc50 decode: Move registry package to decode/registry and add a format group type 2021-11-17 16:59:56 +01:00
Mattias Wadman
13fae09172 interp: Don't print context cancel 2021-11-01 13:01:05 +01:00
Mattias Wadman
3bfc95b3c2 test: Nicer test output 2021-09-19 11:58:37 +02:00
Mattias Wadman
90c19c6cc1 make,test: Move testjq to own script and reuse fq binary
Remove version from --help for now
2021-09-19 11:50:41 +02:00
Mattias Wadman
93fd097b53 cli: Add -M -C support and default to color if tty 2021-09-19 01:19:48 +02:00
Mattias Wadman
e4e269b162 Rename and move cli test to pkg/cli 2021-09-18 18:23:28 +02:00
Mattias Wadman
6356a84f15 cli: Add --raw-string 2021-09-12 13:08:54 +02:00
Mattias Wadman
b33f2cd678 cli: Make profile build optional and move it to cli 2021-09-12 13:08:53 +02:00
Mattias Wadman
2874bc7995 cli: Unbreak colors in windows 2021-09-12 13:08:53 +02:00
Mattias Wadman
5c8fb5f97a cli: Revert accidental history path change 2021-09-12 13:08:52 +02:00
Mattias Wadman
22eb53d5f6 cli: Cleanup MaybeLogFile 2021-09-12 13:08:52 +02:00
Mattias Wadman
f1507f7f65 mod: Use proper path and dont use replace 2021-09-12 13:08:50 +02:00
Mattias Wadman
970465996c Init 2021-09-12 13:08:42 +02:00