Commit graph

7 commits

Author SHA1 Message Date
Steve Francia 1d6286b094 update to use cobra's sub package doc 2015-12-24 10:31:44 -05:00
Anthony Fok 8509727fe8 Add copyright header to that source files that don’t have one.
See #1646
2015-12-10 15:19:38 -07:00
Bjørn Erik Pedersen 3f0f7eed68 Improve error handling in commands
Cobra, the CLI commander in use in Hugo, has some long awaited improvements in the error handling department.
This enables a more centralized error handling approach.

This commit introduces that by changing all the command funcs to `RunE`:

* The core part of the error logging, usage logging and `os.Exit(-1)` is now performed in one place and that one place only.
* The usage text is now only shown on invalid arguments etc. (user errors)

Fixes #1502
2015-12-02 07:07:05 -07:00
Anthony Fok 666ddd2377 Enable dirname and filename completion for more flags
These flags are:

 * --source (-s), --cacheDir, --destination (-d) and --logFile
 * --completionfile and --dir.
2015-12-02 02:24:49 -07:00
Anthony Fok 50b5d0af29 Support setting target directory in hugo gen man
Fixes #1627
2015-11-28 07:32:02 -07:00
Bjørn Erik Pedersen 3d09de8910 Restructure the gen commands
Fixes #1603
2015-11-23 16:51:12 +01:00
Anthony Fok 098a0c819a Add commands/genman.go to autogenerate man pages
Fixes #1369
2015-11-22 18:54:44 +01:00