mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-15 04:54:41 -04:00
parent
9c915ea275
commit
91bea48f52
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
date: 2020-09-13
|
date: 2021-01-06
|
||||||
title: "hugo gen autocomplete"
|
title: "hugo gen autocomplete"
|
||||||
slug: hugo_gen_autocomplete
|
slug: hugo_gen_autocomplete
|
||||||
url: /commands/hugo_gen_autocomplete/
|
url: /commands/hugo_gen_autocomplete/
|
||||||
@ -12,9 +12,6 @@ Generate shell autocompletion script for Hugo
|
|||||||
|
|
||||||
Generates a shell autocompletion script for Hugo.
|
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
|
By default, the file is written directly to /etc/bash_completion.d
|
||||||
for convenience, and the command may need superuser rights, e.g.:
|
for convenience, and the command may need superuser rights, e.g.:
|
||||||
|
|
||||||
@ -23,10 +20,13 @@ for convenience, and the command may need superuser rights, e.g.:
|
|||||||
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.
|
||||||
|
|
||||||
|
Add `--type={bash, zsh, fish or powershell}` flag to set alternative
|
||||||
|
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
|
$ . /etc/bash_completion or /path/to/file
|
||||||
|
|
||||||
```
|
```
|
||||||
hugo gen autocomplete [flags]
|
hugo gen autocomplete [flags]
|
||||||
@ -37,7 +37,7 @@ hugo gen autocomplete [flags]
|
|||||||
```
|
```
|
||||||
--completionfile string autocompletion file (default "/etc/bash_completion.d/hugo.sh")
|
--completionfile string autocompletion file (default "/etc/bash_completion.d/hugo.sh")
|
||||||
-h, --help help for autocomplete
|
-h, --help help for autocomplete
|
||||||
--type string autocompletion type (currently only bash supported) (default "bash")
|
--type string autocompletion type (zsh, bash, fish or powershell) (default "bash")
|
||||||
```
|
```
|
||||||
|
|
||||||
### Options inherited from parent commands
|
### Options inherited from parent commands
|
||||||
@ -62,4 +62,4 @@ hugo gen autocomplete [flags]
|
|||||||
|
|
||||||
* [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 13-Sep-2020
|
###### Auto generated by spf13/cobra on 6-Jan-2021
|
||||||
|
Loading…
x
Reference in New Issue
Block a user