Skip to content

Commit

Permalink
Add JQ_PATHS_ARGS to jq-paths (#34)
Browse files Browse the repository at this point in the history
LGTM!
  • Loading branch information
Gerrit-K authored Jan 9, 2024
1 parent 223c246 commit 2084e0d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bin/jq-paths
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
#!/bin/sh
# path logic inspired by https://github.com/stedolan/jq/issues/243
JQ_REPL_JQ="${JQ_REPL_JQ:-jq}"
$JQ_REPL_JQ -r '
# JQ_PATHS_ARGS has to be unquoted so it's passed as cli args to jq so
# word splitting is desirable here
# shellcheck disable=SC2086
$JQ_REPL_JQ ${JQ_PATHS_ARGS:-} -r '
[
path(..) |
map(
Expand Down

0 comments on commit 2084e0d

Please sign in to comment.