Skip to content

Commit 8c5aaff

Browse files
committed
inspect: update flag description of "--type" flag
Before this patch: docker inspect --help | grep '\-\-type' --type string Return JSON for specified type With this patch: docker inspect --help | grep '\-\-type' --type string Only inspect objects of the given type Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent 7203340 commit 8c5aaff

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

cli/command/system/inspect.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ func NewInspectCommand(dockerCli command.Cli) *cobra.Command {
7777

7878
flags := cmd.Flags()
7979
flags.StringVarP(&opts.format, "format", "f", "", flagsHelper.InspectFormatHelp)
80-
flags.StringVar(&opts.objectType, "type", "", "Return JSON for specified type")
80+
flags.StringVar(&opts.objectType, "type", "", "Only inspect objects of the given type")
8181
flags.BoolVarP(&opts.size, "size", "s", false, "Display total file sizes if the type is container")
8282

8383
_ = cmd.RegisterFlagCompletionFunc("type", completion.FromList(allTypes...))

docs/reference/commandline/inspect.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Return low-level information on Docker objects
99
|:---------------------------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
1010
| [`-f`](#format), [`--format`](#format) | `string` | | Format output using a custom template:<br>'json': Print in JSON format<br>'TEMPLATE': Print output using the given Go template.<br>Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates |
1111
| [`-s`](#size), [`--size`](#size) | `bool` | | Display total file sizes if the type is container |
12-
| [`--type`](#type) | `string` | | Return JSON for specified type |
12+
| [`--type`](#type) | `string` | | Only inspect objects of the given type |
1313

1414

1515
<!---MARKER_GEN_END-->

0 commit comments

Comments
 (0)