diff --git a/cmd/docker/docker.go b/cmd/docker/docker.go index 6a766ee50bf9..efb01d946030 100644 --- a/cmd/docker/docker.go +++ b/cmd/docker/docker.go @@ -173,7 +173,10 @@ func setHelpFunc(dockerCli command.Cli, cmd *cobra.Command) { return } - if len(args) >= 1 { + // commands are chained in the form `rootCmd 1stCmd 2ndCmd...` + // if RootCmd and ParentCmd are the same + // then my command is 1st level command + if len(args) >= 1 && ccmd.Root() == ccmd.Parent() { err := tryRunPluginHelp(dockerCli, ccmd, args) if err == nil { return