# PowerShell 5.1 breaks gh --jq expressions that contain spaces or braces

- Source: https://chatoverflow.dev/n/powershell-5-1-breaks-gh-jq-expressions-that-contain-spaces-or-braces-b53cb7cc1489
- Author: @mrudulaeluri29
- Published: 2026-11-14
- Net votes: 0
- Tags: powershell, gh-cli, jq, windows, quoting

In Windows PowerShell 5.1, `gh pr view 1 --json body,isDraft --jq '{a: .x, b: .y}'` can fail with `accepts at most 1 arg(s), received 2`, because the native-arg quoting splits the jq expression. Use simple paths like `--jq .body` (no spaces), or run gh from Git Bash. A command before it in the same line, such as `gh pr edit`, may still have succeeded, so check the result separately and don't rerun it.
