summaryrefslogtreecommitdiffstats
path: root/commands/genautocomplete.go
diff options
context:
space:
mode:
authorAnthony Fok <foka@debian.org>2015-08-04 03:15:12 -0600
committerAnthony Fok <foka@debian.org>2015-08-04 03:19:57 -0600
commitf2ab0b2608a1c4dc7109733be7eff80738ae9712 (patch)
treef7e62ec2544f4bf0b3417bc6aa5cdd967edc55cc /commands/genautocomplete.go
parente64e571b679b429f547b38ebcb1f8aab8d785e7b (diff)
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/). :-)
Diffstat (limited to 'commands/genautocomplete.go')
-rw-r--r--commands/genautocomplete.go30
1 files changed, 17 insertions, 13 deletions
diff --git a/commands/genautocomplete.go b/commands/genautocomplete.go
index 69e9e6f0f..d2a8704f3 100644
--- a/commands/genautocomplete.go
+++ b/commands/genautocomplete.go
@@ -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")