mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-31 22:41:53 +02:00
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:
@@ -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")
|
||||
|
Reference in New Issue
Block a user