mirror of
https://github.com/wader/fq.git
synced 2024-12-02 04:05:35 +03:00
ab8c728aaa
There is still an alias for --decode-file
219 lines
4.4 KiB
Plaintext
219 lines
4.4 KiB
Plaintext
$ fq -n options
|
||
{
|
||
"addrbase": 16,
|
||
"arg": [],
|
||
"argdecode": [],
|
||
"argjson": [],
|
||
"array_truncate": 50,
|
||
"bits_format": "snippet",
|
||
"byte_colors": [
|
||
{
|
||
"ranges": [
|
||
[
|
||
0,
|
||
255
|
||
]
|
||
],
|
||
"value": "brightwhite"
|
||
},
|
||
{
|
||
"ranges": [
|
||
[
|
||
0
|
||
]
|
||
],
|
||
"value": "brightblack"
|
||
},
|
||
{
|
||
"ranges": [
|
||
[
|
||
32,
|
||
126
|
||
],
|
||
[
|
||
9,
|
||
13
|
||
]
|
||
],
|
||
"value": "white"
|
||
}
|
||
],
|
||
"color": false,
|
||
"colors": {
|
||
"array": "white",
|
||
"dumpaddr": "yellow",
|
||
"dumpheader": "yellow+underline",
|
||
"error": "brightred",
|
||
"false": "yellow",
|
||
"index": "white",
|
||
"null": "brightblack",
|
||
"number": "cyan",
|
||
"object": "white",
|
||
"objectkey": "brightblue",
|
||
"prompt_repl_level": "brightblack",
|
||
"prompt_value": "white",
|
||
"string": "green",
|
||
"true": "yellow",
|
||
"value": "white"
|
||
},
|
||
"compact": false,
|
||
"completion_timeout": 10,
|
||
"decode_format": "probe",
|
||
"decode_progress": false,
|
||
"depth": 0,
|
||
"display_bytes": 16,
|
||
"expr": "options",
|
||
"expr_eval_path": "arg",
|
||
"expr_file": null,
|
||
"filenames": [
|
||
null
|
||
],
|
||
"force": false,
|
||
"include_path": null,
|
||
"join_string": "\n",
|
||
"line_bytes": 16,
|
||
"null_input": true,
|
||
"raw_file": [],
|
||
"raw_output": false,
|
||
"raw_string": false,
|
||
"repl": false,
|
||
"show_formats": false,
|
||
"show_help": false,
|
||
"sizebase": 10,
|
||
"slurp": false,
|
||
"string_input": false,
|
||
"unicode": false,
|
||
"verbose": false,
|
||
"width": 135
|
||
}
|
||
$ fq -o addrbase=10 -n options.addrbase
|
||
10
|
||
$ fq -o addrbase=true -n options.addrbase
|
||
16
|
||
$ fq -o array_truncate=10 -n options.array_truncate
|
||
10
|
||
$ fq -o array_truncate=true -n options.array_truncate
|
||
50
|
||
$ fq -o bits_format=base64 -n options.bits_format
|
||
"base64"
|
||
$ fq -o byte_colors=0-0xff=red -n options.byte_colors
|
||
[
|
||
{
|
||
"ranges": [
|
||
[
|
||
0,
|
||
255
|
||
]
|
||
],
|
||
"value": "red"
|
||
}
|
||
]
|
||
$ fq -o color=10 -n options.color
|
||
[33mtrue[m
|
||
$ fq -o color=true -n options.color
|
||
[33mtrue[m
|
||
$ fq -o colors=number=red -n options.colors
|
||
{
|
||
"number": "red"
|
||
}
|
||
$ fq -o compact=true -n options.compact
|
||
true
|
||
$ fq -o compact=aaa -n options.compact
|
||
false
|
||
$ fq -n -o 'argdecode=[["a", "test.mp3"]]' '$a | format'
|
||
"mp3"
|
||
$ fq -o decode_progress=false -n options.decode_progress
|
||
false
|
||
$ fq -o decode_progress=aaa -n options.decode_progress
|
||
false
|
||
$ fq -o depth=10 -n options.depth
|
||
10
|
||
$ fq -o depth=true -n options.depth
|
||
0
|
||
$ fq -o display_bytes=10 -n options.display_bytes
|
||
10
|
||
$ fq -o display_bytes=true -n options.display_bytes
|
||
16
|
||
$ fq -n -o expr=123
|
||
123
|
||
$ fq -o expr_file=test.jq -n options.expr_file
|
||
exitcode: 2
|
||
stderr:
|
||
error: test.jq: no such file or directory
|
||
$ fq -o 'filenames=["test.mp3"]' format
|
||
"mp3"
|
||
$ fq -o 'force=true' -n options.force
|
||
true
|
||
$ fq -o include_path=path -n options.include_path
|
||
"path"
|
||
$ fq -o 'join_string=aaa\n' -n options.join_string
|
||
"aaa\n"aaa
|
||
$ fq -o line_bytes=true -n options.line_bytes
|
||
16
|
||
$ fq -o null_input=true -n options.null_input
|
||
true
|
||
$ fq -o null_input=aaa -n options.null_input
|
||
true
|
||
$ fq -o raw_output=true -n options.raw_output
|
||
true
|
||
$ fq -o raw_output=aaa -n options.raw_output
|
||
false
|
||
$ fq -o raw_string=true -n options.raw_string
|
||
true
|
||
$ fq -o raw_string=aa -n options.raw_string
|
||
false
|
||
$ fq -o repl=true -n options.repl
|
||
boolean> ^D
|
||
$ fq -o sizebase=10 -n options.sizebase
|
||
10
|
||
$ fq -o sizebase=aaa -n options.sizebase
|
||
10
|
||
$ fq -o slurp=true -n options.slurp
|
||
true
|
||
$ fq -o slurp=aaa -n options.slurp
|
||
false
|
||
$ fq -o string_input=true -n options.string_input
|
||
true
|
||
$ fq -o string_input=aaa -n options.string_input
|
||
false
|
||
$ fq -o unicode=true -n options.unicode
|
||
true
|
||
$ fq -o unicode=aaa -n options.unicode
|
||
false
|
||
$ fq -o verbose=true -n options.verbose
|
||
true
|
||
$ fq -o verbose=aaa -n options.verbose
|
||
false
|
||
$ fq -n "options | {display_bytes, line_bytes}"
|
||
{
|
||
"display_bytes": 16,
|
||
"line_bytes": 16
|
||
}
|
||
$ _STDOUT_IS_TERMINAL= fq -n "options | {display_bytes, line_bytes}"
|
||
{
|
||
"display_bytes": 16,
|
||
"line_bytes": 16
|
||
}
|
||
$ _STDOUT_WIDTH=160 _STDOUT_HEIGHT=40 fq -n "options | {display_bytes, line_bytes}"
|
||
{
|
||
"display_bytes": 20,
|
||
"line_bytes": 20
|
||
}
|
||
$ _STDOUT_IS_TERMINAL= _STDOUT_WIDTH=160 _STDOUT_HEIGHT=40 fq -n "options | {display_bytes, line_bytes}"
|
||
{
|
||
"display_bytes": 20,
|
||
"line_bytes": 20
|
||
}
|
||
$ fq -in
|
||
null> options | {display_bytes, line_bytes}
|
||
{
|
||
"display_bytes": 16,
|
||
"line_bytes": 16
|
||
}
|
||
null> _STDOUT_WIDTH=160 _STDOUT_HEIGHT=40 options | {display_bytes, line_bytes}
|
||
{
|
||
"display_bytes": 20,
|
||
"line_bytes": 20
|
||
}
|
||
null> ^D
|