Skip to content

Commit

Permalink
interp: Document inputs and repl/cli details
Browse files Browse the repository at this point in the history
  • Loading branch information
wader committed Nov 1, 2021
1 parent 0660ff0 commit 80b5d66
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/interp/interp.jq
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ def _main:
, null | halt_error(_exit_code_args_error)
)
else
# use _finally as display etc prints and results in empty
# use _finally as display etc prints and outputs empty
_finally(
# store some globals
( _include_paths($opts.include_path) as $_
Expand All @@ -435,6 +435,11 @@ def _main:
| from_entries
)
)
# for inputs a, b, c:
# repl: [a,b,c] | repl
# repl slurp: [[a, b, c]] | repl
# cli a, b, c | expr
# cli slurp [a ,b c] | expr
| ( def _inputs:
( if $opts.null_input then null
# note that jq --slurp --raw-input (string_input) is special, will concat
Expand Down

0 comments on commit 80b5d66

Please sign in to comment.