1
1
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:
Mattias Wadman 2021-10-18 00:59:35 +02:00
parent 36fd74a181
commit d6d94842b5
5 changed files with 3 additions and 54 deletions

View File

@ -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

View 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

View File

@ -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),

View File

@ -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:

View File

@ -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,