From 11d909170ef555ffbb26b89b7b44956f1ee2f075 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Ferenczy=20Rogo=C5=BEan?= Date: Fri, 16 Jun 2023 15:47:37 +0200 Subject: [PATCH] Added usage under Powershell to the manual (#2306) --- docs/content/manual/manual.yml | 10 +++++++++- docs/content/manual/v1.6/manual.yml | 10 +++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/docs/content/manual/manual.yml b/docs/content/manual/manual.yml index 0d552c7f..431ebcbc 100644 --- a/docs/content/manual/manual.yml +++ b/docs/content/manual/manual.yml @@ -91,7 +91,15 @@ sections: defined`. When using the Windows command shell (cmd.exe) it's best to use double quotes around your jq program when given on the command-line (instead of the `-f program-file` option), but then - double-quotes in the jq program need backslash escaping. + double-quotes in the jq program need backslash escaping. When using + the Powershell (`powershell.exe`) or the Powershell Core + (`pwsh`/`pwsh.exe`), use single-quote characters around the jq + program and backslash-escaped double-quotes (`\"`) inside the jq + program. + + Unix shells: `jq '.["foo"]'` + Powershell: `jq '.[\"foo\"]'` + Windows command shell: `jq ".[\"foo\"]"` You can affect how jq reads and writes its input and output using some command-line options: diff --git a/docs/content/manual/v1.6/manual.yml b/docs/content/manual/v1.6/manual.yml index 5aadf0cc..58de6e91 100644 --- a/docs/content/manual/v1.6/manual.yml +++ b/docs/content/manual/v1.6/manual.yml @@ -90,7 +90,15 @@ sections: defined`. When using the Windows command shell (cmd.exe) it's best to use double quotes around your jq program when given on the command-line (instead of the `-f program-file` option), but then - double-quotes in the jq program need backslash escaping. + double-quotes in the jq program need backslash escaping. When using + the Powershell (`powershell.exe`) or the Powershell Core + (`pwsh`/`pwsh.exe`), use single-quote characters around the jq + program and backslash-escaped double-quotes (`\"`) inside the jq + program. + + Unix shells: `jq '.["foo"]'` + Powershell: `jq '.[\"foo\"]'` + Windows command shell: `jq ".[\"foo\"]"` You can affect how jq reads and writes its input and output using some command-line options: