Skip to content

Commit d75cf88

Browse files
committed
jpp: Make stream behavior unconditional and remove --stream, -s flag
Mirrors sentiments expressed here: jmespath/jp#14 (comment) jmespath/jp#14 (comment)
1 parent ba4e883 commit d75cf88

2 files changed

Lines changed: 1 addition & 8 deletions

File tree

cmd/jpp/main.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@ func main() {
3737
Name: "unquoted, u",
3838
Usage: "If the final result is a string, it will be printed without quotes.",
3939
},
40-
cli.BoolFlag{
41-
Name: "stream, s",
42-
Usage: "Parse JSON elements until the input stream is exhausted (rather than just the first).",
43-
},
4440
cli.BoolFlag{
4541
Name: "ast",
4642
Usage: "Only print the AST of the parsed expression. Do not rely on this output, only useful for debugging purposes.",
@@ -135,9 +131,6 @@ func runMain(c *cli.Context) int {
135131
os.Stdout.Write(toJSON)
136132
}
137133
os.Stdout.WriteString("\n")
138-
if !c.Bool("stream") {
139-
break
140-
}
141134
}
142135
return 0
143136
}

test/cases/search.bats

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
}
2121

2222
@test "Processes subsequent data in stream mode" {
23-
output=$(echo '{"foo": "bar"}{"foo": "x"}' | ./jpp -s foo)
23+
output=$(echo '{"foo": "bar"}{"foo": "x"}' | ./jpp foo)
2424
echo "$output"
2525
[ "$output" == $'\"bar\"\n\"x\"' ]
2626
}

0 commit comments

Comments
 (0)