mirror of
https://github.com/wader/fq.git
synced 2024-11-22 15:45:45 +03:00
interp: Remove --options, probably just confusing
This commit is contained in:
parent
36fd74a181
commit
d6d94842b5
@ -93,8 +93,7 @@ Usage: fq [OPTIONS] [--] [EXPR] [FILE...]
|
||||
--monochrome-output,-M Force monochrome output
|
||||
--null-input,-n Null input (use input/0 and inputs/0 to read input)
|
||||
--null-output,-0 Null byte between outputs
|
||||
--option,-o KEY=VALUE Set option, eg: color=true
|
||||
--options Show all options
|
||||
--option,-o KEY=VALUE Set option, eg: color=true (use options/0 to see all options)
|
||||
--raw-input,-R Read raw input strings (don't decode)
|
||||
--raw-output,-r Raw string output (without quotes)
|
||||
--rawfile NAME PATH Set variable $NAME to string content of file
|
||||
|
@ -277,14 +277,9 @@ def _main:
|
||||
"option": {
|
||||
short: "-o",
|
||||
long: "--option",
|
||||
description: "Set option, eg: color=true",
|
||||
description: "Set option, eg: color=true (use options/0 to see all options)",
|
||||
object: "KEY=VALUE",
|
||||
},
|
||||
"show_options": {
|
||||
long: "--options",
|
||||
description: "Show all options",
|
||||
bool: true
|
||||
},
|
||||
"string_input": {
|
||||
short: "-R",
|
||||
long: "--raw-input",
|
||||
@ -452,8 +447,6 @@ def _main:
|
||||
$version | println
|
||||
elif $opts.show_formats then
|
||||
_formats_list | println
|
||||
elif $opts.show_options then
|
||||
$opts | display
|
||||
elif
|
||||
( ($rest | length) == 0 and
|
||||
($opts.repl | not) and
|
||||
|
@ -47,7 +47,6 @@ def _build_default_fixed_options:
|
||||
sizebase: 10,
|
||||
show_formats: false,
|
||||
show_help: false,
|
||||
show_options: false,
|
||||
slurp: false,
|
||||
string_input: false,
|
||||
unicode: ($stdout.is_terminal and env.CLIUNICODE != null),
|
||||
@ -128,7 +127,6 @@ def _to_options:
|
||||
sizebase: (.sizebase | _tonumber),
|
||||
show_formats: (.show_formats | _toboolean),
|
||||
show_help: (.show_help | _toboolean),
|
||||
show_options: (.show_options | _toboolean),
|
||||
slurp: (.slurp | _toboolean),
|
||||
string_input: (.string_input | _toboolean),
|
||||
unicode: (.unicode | _toboolean),
|
||||
|
42
pkg/interp/testdata/args.fqtest
vendored
42
pkg/interp/testdata/args.fqtest
vendored
@ -22,8 +22,7 @@ Usage: fq [OPTIONS] [--] [EXPR] [FILE...]
|
||||
--monochrome-output,-M Force monochrome output
|
||||
--null-input,-n Null input (use input/0 and inputs/0 to read input)
|
||||
--null-output,-0 Null byte between outputs
|
||||
--option,-o KEY=VALUE Set option, eg: color=true
|
||||
--options Show all options
|
||||
--option,-o KEY=VALUE Set option, eg: color=true (use options/0 to see all options)
|
||||
--raw-input,-R Read raw input strings (don't decode)
|
||||
--raw-output,-r Raw string output (without quotes)
|
||||
--rawfile NAME PATH Set variable $NAME to string content of file
|
||||
@ -116,45 +115,6 @@ vpx_ccr VPX Codec Configuration Record
|
||||
wav WAV file
|
||||
webp WebP image
|
||||
xing Xing header
|
||||
$ fq --options
|
||||
{
|
||||
"addrbase": 16,
|
||||
"arg": [],
|
||||
"argjson": [],
|
||||
"array_truncate": 50,
|
||||
"bits_format": "snippet",
|
||||
"byte_colors": "0-0xff=brightwhite,0=brightblack,32-126:9-13=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,string=green,true=yellow,value=white",
|
||||
"compact": false,
|
||||
"decode_file": [],
|
||||
"decode_format": "probe",
|
||||
"decode_progress": false,
|
||||
"depth": 0,
|
||||
"display_bytes": 16,
|
||||
"expr": ".",
|
||||
"expr_eval_path": "arg",
|
||||
"expr_file": null,
|
||||
"filenames": [
|
||||
"-"
|
||||
],
|
||||
"include_path": null,
|
||||
"join_string": "\n",
|
||||
"line_bytes": 16,
|
||||
"null_input": false,
|
||||
"raw_output": false,
|
||||
"raw_string": false,
|
||||
"rawfile": [],
|
||||
"repl": false,
|
||||
"show_formats": false,
|
||||
"show_help": false,
|
||||
"show_options": true,
|
||||
"sizebase": 10,
|
||||
"slurp": false,
|
||||
"string_input": false,
|
||||
"unicode": false,
|
||||
"verbose": false
|
||||
}
|
||||
$ fq -X
|
||||
exitcode: 2
|
||||
stderr:
|
||||
|
1
pkg/interp/testdata/options.fqtest
vendored
1
pkg/interp/testdata/options.fqtest
vendored
@ -30,7 +30,6 @@ $ fq -n options
|
||||
"repl": false,
|
||||
"show_formats": false,
|
||||
"show_help": false,
|
||||
"show_options": false,
|
||||
"sizebase": 10,
|
||||
"slurp": false,
|
||||
"string_input": false,
|
||||
|
Loading…
Reference in New Issue
Block a user