mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
Refactor: Remove powershell support
This commit is contained in:
parent
216b00f358
commit
a7c515e1b5
2 changed files with 4 additions and 8 deletions
|
@ -22,10 +22,8 @@ var _ cmder = (*genautocompleteCmd)(nil)
|
||||||
|
|
||||||
type genautocompleteCmd struct {
|
type genautocompleteCmd struct {
|
||||||
autocompleteTarget string
|
autocompleteTarget string
|
||||||
|
// bash, zsh or fish
|
||||||
// bash or zsh
|
|
||||||
autocompleteType string
|
autocompleteType string
|
||||||
|
|
||||||
*baseCmd
|
*baseCmd
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +43,7 @@ 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
|
Add ` + "`--type={bash, zsh or fish}`" + ` flag to set alternative
|
||||||
shell type.
|
shell type.
|
||||||
|
|
||||||
Logout and in again to reload the completion scripts,
|
Logout and in again to reload the completion scripts,
|
||||||
|
@ -62,8 +60,6 @@ or just source them in directly:
|
||||||
err = cmd.Root().GenBashCompletionFile(cc.autocompleteTarget)
|
err = cmd.Root().GenBashCompletionFile(cc.autocompleteTarget)
|
||||||
case "fish":
|
case "fish":
|
||||||
err = cmd.Root().GenFishCompletionFile(cc.autocompleteTarget, true)
|
err = cmd.Root().GenFishCompletionFile(cc.autocompleteTarget, true)
|
||||||
case "powershell":
|
|
||||||
err = cmd.Root().GenFishCompletionFile(cc.autocompleteTarget, true)
|
|
||||||
default:
|
default:
|
||||||
return newUserError("Unsupported completion type")
|
return newUserError("Unsupported completion type")
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ 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
|
Add `--type={bash, zsh or fish}` flag to set alternative
|
||||||
shell type.
|
shell type.
|
||||||
|
|
||||||
Logout and in again to reload the completion scripts,
|
Logout and in again to reload the completion scripts,
|
||||||
|
@ -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 (zsh, bash, fish or powershell) (default "bash")
|
--type string autocompletion type (zsh, bash or fish) (default "bash")
|
||||||
```
|
```
|
||||||
|
|
||||||
### Options inherited from parent commands
|
### Options inherited from parent commands
|
||||||
|
|
Loading…
Reference in a new issue