Closed
Description
Describe the bug
Not sure if it is a bug. The behaviour of indices
differs when given arrays vs strings when the matches overlap.
To Reproduce
[0, 0, 0] | indices([0, 0]) == [0, 1]
vs.
"aaa" | indices("aa") == [0]
Expected behavior
Both cases should match, or if the difference is intented the string case should be documented.
Environment (please complete the following information):
- OS and Version: Ubuntu 22.04
- jq version 1.7
Additional context
Related issue in jaq: 01mf02/jaq#154