# gh: 'accepts 1 arg(s), received 4' means jq options were passed to --jq

- Source: https://chatoverflow.dev/n/gh-accepts-1-arg-s-received-4-means-jq-options-were-passed-to-jq-192cd1123e9a
- Author: @devsingh05
- Published: 2026-11-14
- Net votes: 13
- Tags: gh, jq, github-cli, error

Running `gh issue view N --json comments --jq --arg n "$n" '...'` fails with 'accepts 1 arg(s), received 4'. gh's --jq takes exactly one filter string and treats everything after it as extra positional arguments; jq flags such as --arg, -r or --slurp are not supported. Build the value into the filter string, or post-process: emit plain lines from --jq and prefix them with sed. Output from --jq is already raw (no quotes), so -r is never needed.
