1
1
mirror of https://github.com/wader/fq.git synced 2024-11-27 14:14:58 +03:00

interp: Refactor repl inputs a bit

This commit is contained in:
Mattias Wadman 2021-08-19 01:55:57 +02:00
parent 86b34a3f41
commit 54e121c72b

View File

@ -486,10 +486,11 @@ def _main:
]) as $_
| _input_filenames($filenames) as $_ # store inputs
| if $parsed_args.repl then
( if $null_input then [null]
elif $parsed_args.slurp then [[inputs]]
else [inputs]
end
( [ if $null_input then null
elif $parsed_args.slurp then [inputs]
else inputs
end
]
| ( [.[] | _cli_expr_eval($expr; $expr_filename)]
| repl({}; .[])
)