Skip to content

Commit

Permalink
Put Windows example inside note shortcode
Browse files Browse the repository at this point in the history
I'm putting the Windows example in a Hug note shortcode to be consistent
with the rest of the documentation.

Signed-off-by: Mariyan Dimitrov <[email protected]>
  • Loading branch information
merkata committed Jan 30, 2020
1 parent 2b09894 commit 8c7e11b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions content/en/docs/reference/kubectl/jsonpath.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,13 @@ kubectl get pods -o=jsonpath="{.items[*]['metadata.name', 'status.capacity']}"
kubectl get pods -o=jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.status.startTime}{"\n"}{end}'
```

{{< note >}}
On Windows, you must _double_ quote any JSONPath template that contains spaces (not single quote as shown above for bash). This in turn means that you must use a single quote or escaped double quote around any literals in the template. For example:

```cmd
kubectl get pods -o=jsonpath="{range .items[*]}{.metadata.name}{'\t'}{.status.startTime}{'\n'}{end}"
kubectl get pods -o=jsonpath="{range .items[*]}{.metadata.name}{\"\t\"}{.status.startTime}{\"\n\"}{end}"
```
{{< /note >}}

{{% /capture %}}

0 comments on commit 8c7e11b

Please sign in to comment.