From 2084e0d9b6244f12e0d95686a647b3db8f27acb7 Mon Sep 17 00:00:00 2001 From: Gerrit-K Date: Tue, 9 Jan 2024 15:03:00 +0100 Subject: [PATCH] Add JQ_PATHS_ARGS to jq-paths (#34) LGTM! --- bin/jq-paths | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/jq-paths b/bin/jq-paths index 605e73a..7c53075 100755 --- a/bin/jq-paths +++ b/bin/jq-paths @@ -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(