From 0c55a6ddcfdc194938c205d1a88406639988341e Mon Sep 17 00:00:00 2001 From: Maximillian Xavier Date: Fri, 4 Sep 2020 08:35:18 -0300 Subject: [PATCH] Add note to formatting section (#11326) * Add note to formatting section * Add note to formatting section * Fix the double quote to single quote * Fix description * Minor style updates Co-authored-by: Maximillian Fan Xavier Co-authored-by: Usha Mandya <47779042+usha-mandya@users.noreply.github.com> --- config/formatting.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/config/formatting.md b/config/formatting.md index 2004c85f34..3e1c001ddf 100644 --- a/config/formatting.md +++ b/config/formatting.md @@ -14,6 +14,28 @@ All of these examples use the `docker inspect` command, but many other CLI commands have a `--format` flag, and many of the CLI command references include examples of customizing the output format. +>**Note** +> +> Whe using the `--format` flag, you need observe your shell environment. +> In a Posix shell, you can run the following with a single quote: +> +> {% raw %} +> ```bash +> docker inspect --format '{{join .Args " , "}}' +> ``` +> {% endraw %} +> +> Otherwise, in a Windows shell (for example, PowerShell), you need to use single quotes, but +> escape the double quotes inside the params as follows: +> +> {% raw %} +> ```bash +> docker inspect --format '{{join .Args \" , \"}}' +> ``` +> {% endraw %} +> +{:.important} + ## join `join` concatenates a list of strings to create a single string.