| 1 |
--- |
| 2 |
title: "hugo completion zsh" |
| 3 |
slug: hugo_completion_zsh |
| 4 |
url: /commands/hugo_completion_zsh/ |
| 5 |
--- |
| 6 |
## hugo completion zsh |
| 7 |
|
| 8 |
Generate the autocompletion script for zsh |
| 9 |
|
| 10 |
### Synopsis |
| 11 |
|
| 12 |
Generate the autocompletion script for the zsh shell. |
| 13 |
|
| 14 |
If shell completion is not already enabled in your environment you will need |
| 15 |
to enable it. You can execute the following once: |
| 16 |
|
| 17 |
echo "autoload -U compinit; compinit" >> ~/.zshrc |
| 18 |
|
| 19 |
To load completions in your current shell session: |
| 20 |
|
| 21 |
source <(hugo completion zsh) |
| 22 |
|
| 23 |
To load completions for every new session, execute once: |
| 24 |
|
| 25 |
#### Linux: |
| 26 |
|
| 27 |
hugo completion zsh > "${fpath[1]}/_hugo" |
| 28 |
|
| 29 |
#### macOS: |
| 30 |
|
| 31 |
hugo completion zsh > $(brew --prefix)/share/zsh/site-functions/_hugo |
| 32 |
|
| 33 |
You will need to start a new shell for this setup to take effect. |
| 34 |
|
| 35 |
|
| 36 |
``` |
| 37 |
hugo completion zsh [flags] |
| 38 |
``` |
| 39 |
|
| 40 |
### Options |
| 41 |
|
| 42 |
``` |
| 43 |
-h, --help help for zsh |
| 44 |
--no-descriptions disable completion descriptions |
| 45 |
``` |
| 46 |
|
| 47 |
### Options inherited from parent commands |
| 48 |
|
| 49 |
``` |
| 50 |
--clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00 |
| 51 |
--config string config file (default is hugo.yaml|json|toml) |
| 52 |
--configDir string config dir (default "config") |
| 53 |
-d, --destination string filesystem path to write files to |
| 54 |
-e, --environment string build environment |
| 55 |
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern |
| 56 |
--logLevel string log level (debug|info|warn|error) |
| 57 |
--noBuildLock don't create .hugo_build.lock file |
| 58 |
--quiet build in quiet mode |
| 59 |
-M, --renderToMemory render to memory (mostly useful when running the server) |
| 60 |
-s, --source string filesystem path to read files relative from |
| 61 |
--themesDir string filesystem path to themes directory |
| 62 |
``` |
| 63 |
|
| 64 |
### SEE ALSO |
| 65 |
|
| 66 |
* [hugo completion](/commands/hugo_completion/) - Generate the autocompletion script for the specified shell |