jq -r ‘.tool_input.file_path’ — reads JSON from stdin, extracts the .tool_input.file_path string value, and outputs it raw (no quotes, -r)
xargs npx prettier –write — takes the piped file path as an argument and runs npx prettier –write
Example: if stdin contains {“tool_input”: {“file_path”: “src/index.ts”}}, this runs npx prettier –write src/index.ts.
Git Bash terminal in VS Code — closest to Unix behavior; xargs works, but you’d still need jq installed separately (e.g. via winget install jqlang.jq or choco install jq)