From 82c85e1e83f2cf040e69c1a3b3b1ab66538a06bd Mon Sep 17 00:00:00 2001 From: Daniel Nephin Date: Tue, 31 May 2016 14:47:51 -0700 Subject: [PATCH] Make the -h flag deprecated. Signed-off-by: Daniel Nephin --- cobraadaptor/adaptor.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cobraadaptor/adaptor.go b/cobraadaptor/adaptor.go index cfa1b7f04c..db16166f09 100644 --- a/cobraadaptor/adaptor.go +++ b/cobraadaptor/adaptor.go @@ -36,6 +36,9 @@ func NewCobraAdaptor(clientFlags *cliflags.ClientFlags) CobraAdaptor { volume.NewVolumeCommand(dockerCli), ) + rootCmd.PersistentFlags().BoolP("help", "h", false, "Print usage") + rootCmd.PersistentFlags().MarkShorthandDeprecated("help", "please use --help") + return CobraAdaptor{ rootCmd: rootCmd, dockerCli: dockerCli,