mirror of
https://github.com/wader/fq.git
synced 2024-11-24 11:16:09 +03:00
0a043f9096
Now repl, slurp and help implemented using same query rewrite. Include filename context in error if possible. Add spew function that does opposite of slurp. Start of help infra, not done or documented yet. Show error pointer on parse error. Rename internal eval to _eval and make eval be wrapper that does rewrite and has various eror handling etc. Nicer repl, slupr and help errors.
69 lines
717 B
Plaintext
69 lines
717 B
Plaintext
$ fq -i
|
|
null> he\t
|
|
help
|
|
hevc_annexb
|
|
hevc_au
|
|
hevc_dcr
|
|
hevc_nalu
|
|
hex
|
|
hexdump
|
|
null> _is_ide\t
|
|
_is_ident
|
|
null> {aa: 123} | slurp("test")
|
|
null> $\t
|
|
$ENV
|
|
$test
|
|
null> $test[].a\t
|
|
aa
|
|
null> {bb: 123} as $aa | $aa.b\t
|
|
bb
|
|
null> {aa: 123, ab: "a"} | .a\t
|
|
aa
|
|
ab
|
|
null> {a: {aa: 123, ab: "a"}} | .a.a\t
|
|
aa
|
|
ab
|
|
null> {aa: 123, ab: "a"} | repl
|
|
> object> .a\t
|
|
aa
|
|
ab
|
|
> object> ^D
|
|
null> ^D
|
|
$ fq -i . /test.mp3
|
|
mp3> .f\t
|
|
footers
|
|
frames
|
|
mp3> ._\t
|
|
_actual
|
|
_bits
|
|
_buffer_root
|
|
_bytes
|
|
_description
|
|
_error
|
|
_format
|
|
_format_root
|
|
_index
|
|
_len
|
|
_name
|
|
_parent
|
|
_path
|
|
_root
|
|
_start
|
|
_stop
|
|
_sym
|
|
_unknown
|
|
mp3> .frames\t
|
|
frames[]
|
|
mp3> .frames[]\t
|
|
.
|
|
mp3> "abc" | tobitsrange.s\t
|
|
size
|
|
start
|
|
stop
|
|
mp3> options.c\t
|
|
color
|
|
colors
|
|
compact
|
|
completion_timeout
|
|
mp3> ^D
|