type genautocompleteCmd struct {
autocompleteTarget string
-
- // bash or zsh
+ // bash, zsh or fish
autocompleteType string
-
*baseCmd
}
Add ` + "`--completionfile=/path/to/file`" + ` flag to set alternative
file-path and name.
-Add ` + "`--type={bash, zsh, fish or powershell}`" + ` flag to set alternative
+Add ` + "`--type={bash, zsh or fish}`" + ` flag to set alternative
shell type.
Logout and in again to reload the completion scripts,
err = cmd.Root().GenBashCompletionFile(cc.autocompleteTarget)
case "fish":
err = cmd.Root().GenFishCompletionFile(cc.autocompleteTarget, true)
- case "powershell":
- err = cmd.Root().GenFishCompletionFile(cc.autocompleteTarget, true)
default:
return newUserError("Unsupported completion type")
}
Add `--completionfile=/path/to/file` flag to set alternative
file-path and name.
-Add `--type={bash, zsh, fish or powershell}` flag to set alternative
+Add `--type={bash, zsh or fish}` flag to set alternative
shell type.
Logout and in again to reload the completion scripts,
```
--completionfile string autocompletion file (default "/etc/bash_completion.d/hugo.sh")
-h, --help help for autocomplete
- --type string autocompletion type (zsh, bash, fish or powershell) (default "bash")
+ --type string autocompletion type (zsh, bash or fish) (default "bash")
```
### Options inherited from parent commands