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:
parent
86b34a3f41
commit
54e121c72b
@ -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({}; .[])
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user