Improve formatting of Hugo command descriptions

Trying to make them look good both in the terminal (`hugo help [command]`)
and in the web browser (http://gohugo.io/commands/).  :-)
This commit is contained in:
Anthony Fok
2015-08-04 03:15:12 -06:00
parent e64e571b67
commit f2ab0b2608
31 changed files with 432 additions and 388 deletions

View File

@@ -14,19 +14,23 @@ var genautocompleteCmd = &cobra.Command{
Use: "genautocomplete",
Short: "Generate shell autocompletion script for Hugo",
Long: `Generates a shell autocompletion script for Hugo.
NOTE: The current version supports Bash only. This should work for *nix systems with Bash installed.
By default the file is written directly to /etc/bash_completion.d for convenience and the command may need superuser rights, e.g:
sudo hugo genautocomplete
Add --completionfile=/path/to/file flag to set alternative file-path and name.
Logout and in again to reload the completion scripts or just source them in directly:
. /etc/bash_completion
`,
NOTE: The current version supports Bash only.
This should work for *nix systems with Bash installed.
By default, the file is written directly to /etc/bash_completion.d
for convenience, and the command may need superuser rights, e.g.:
$ sudo hugo genautocomplete
Add ` + "`--completionfile=/path/to/file`" + ` flag to set alternative
file-path and name.
Logout and in again to reload the completion scripts,
or just source them in directly:
$ . /etc/bash_completion`,
Run: func(cmd *cobra.Command, args []string) {
if autocompleteType != "bash" {
jww.FATAL.Fatalln("Only Bash is supported for now")