mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-15 12:14:19 +00:00
Refactor: Write to stdout by default
This commit is contained in:
1 parent
d204bf1600
commit
e507721fe7
1 file changed
+5
-5
@@ -12,10 +12,10 @@ Generate shell autocompletion script for Hugo
|
|||||||
|
|
||||||
Generates a shell autocompletion script for Hugo.
|
Generates a shell autocompletion script for Hugo.
|
||||||
|
|
||||||
By default, the file is written directly to /etc/bash_completion.d
|
By default, the file is written directly to `stdout`
|
||||||
for convenience, and the command may need superuser rights, e.g.:
|
for convenience, and the command may need superuser rights, e.g.:
|
||||||
|
|
||||||
$ sudo hugo gen autocomplete
|
$ sudo hugo gen autocomplete
|
||||||
|
|
||||||
Add `--completionfile=/path/to/file` flag to set alternative
|
Add `--completionfile=/path/to/file` flag to set alternative
|
||||||
file-path and name.
|
file-path and name.
|
||||||
@@ -26,7 +26,7 @@ shell type.
|
|||||||
Logout and in again to reload the completion scripts,
|
Logout and in again to reload the completion scripts,
|
||||||
or just source them in directly:
|
or just source them in directly:
|
||||||
|
|
||||||
$ . /etc/bash_completion or /path/to/file
|
$ . /path/to/file
|
||||||
|
|
||||||
```
|
```
|
||||||
hugo gen autocomplete [flags]
|
hugo gen autocomplete [flags]
|
||||||
@@ -35,7 +35,7 @@ hugo gen autocomplete [flags]
|
|||||||
### Options
|
### Options
|
||||||
|
|
||||||
```
|
```
|
||||||
--completionfile string autocompletion file (default "/etc/bash_completion.d/hugo.sh")
|
--completionfile string autocompletion file (defaults to stdout)
|
||||||
-h, --help help for autocomplete
|
-h, --help help for autocomplete
|
||||||
--type string autocompletion type (zsh, bash or fish) (default "bash")
|
--type string autocompletion type (zsh, bash or fish) (default "bash")
|
||||||
```
|
```
|
||||||
@@ -60,6 +60,6 @@ hugo gen autocomplete [flags]
|
|||||||
|
|
||||||
### SEE ALSO
|
### SEE ALSO
|
||||||
|
|
||||||
* [hugo gen](/commands/hugo_gen/) - A collection of several useful generators.
|
- [hugo gen](/commands/hugo_gen/) - A collection of several useful generators.
|
||||||
|
|
||||||
###### Auto generated by spf13/cobra on 6-Jan-2021
|
###### Auto generated by spf13/cobra on 6-Jan-2021
|
||||||
Reference in new issue
Block a user