Add custom Windows mousestrap message
authorbep <bjorn.erik.pedersen@gmail.com>
Tue, 7 Apr 2015 11:01:04 +0000 (13:01 +0200)
committerbep <bjorn.erik.pedersen@gmail.com>
Tue, 7 Apr 2015 11:01:11 +0000 (13:01 +0200)
Fixes #1022

commands/hugo.go

index 5c225fe5db03c7a9ed7256c8cb60ae6ef0d466e9..69ac46f65a7fc8b1b68cf508792937c11f54a98b 100644 (file)
@@ -101,6 +101,13 @@ func init() {
        HugoCmd.Flags().BoolVarP(&BuildWatch, "watch", "w", false, "watch filesystem for changes and recreate as needed")
        HugoCmd.Flags().BoolVarP(&NoTimes, "noTimes", "", false, "Don't sync modification time of files")
        hugoCmdV = HugoCmd
+
+       // This messge will be shown to Windows users if Hugo is opened from explorer.exe
+       cobra.MousetrapHelpText = `
+       
+  Hugo is a command line tool
+
+  You need to open cmd.exe and run it from there.`
 }
 
 // InitializeConfig initializes a config file with sensible default configuration flags.