mirror of
https://github.com/johnkerl/miller.git
synced 2026-01-23 02:14:13 +00:00
Support -o jsonl as well as --ojsonl (#1879)
* `mlr sort -b` feature * mlr regtest -p test/cases/cli-help && make dev * Support `-o jsonl` as well as `--ojsonl`
This commit is contained in:
parent
05429ee3ba
commit
3b9f169162
4 changed files with 18 additions and 7 deletions
|
|
@ -979,9 +979,7 @@ var FileFormatFlagSection = FlagSection{
|
|||
name: "--ojsonl",
|
||||
help: "Use JSON Lines format for output data.",
|
||||
parser: func(args []string, argc int, pargi *int, options *TOptions) {
|
||||
options.WriterOptions.OutputFileFormat = "json"
|
||||
options.WriterOptions.WrapJSONOutputInOuterList = false
|
||||
options.WriterOptions.JSONOutputMultiline = false
|
||||
options.WriterOptions.OutputFileFormat = "jsonl"
|
||||
*pargi += 1
|
||||
},
|
||||
},
|
||||
|
|
@ -1148,9 +1146,7 @@ var FileFormatFlagSection = FlagSection{
|
|||
altNames: []string{"--l2l"},
|
||||
parser: func(args []string, argc int, pargi *int, options *TOptions) {
|
||||
options.ReaderOptions.InputFileFormat = "json"
|
||||
options.WriterOptions.OutputFileFormat = "json"
|
||||
options.WriterOptions.WrapJSONOutputInOuterList = false
|
||||
options.WriterOptions.JSONOutputMultiline = false
|
||||
options.WriterOptions.OutputFileFormat = "jsonl"
|
||||
*pargi += 1
|
||||
},
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue