Skip to content

Commit

Permalink
Refactor: Remove powershell support
Browse files Browse the repository at this point in the history
  • Loading branch information
benmezger authored and anthonyfok committed Feb 4, 2021
1 parent 216b00f commit a7c515e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
8 changes: 2 additions & 6 deletions commands/genautocomplete.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@ var _ cmder = (*genautocompleteCmd)(nil)

type genautocompleteCmd struct {
autocompleteTarget string

// bash or zsh
// bash, zsh or fish
autocompleteType string

*baseCmd
}

Expand All @@ -45,7 +43,7 @@ for convenience, and the command may need superuser rights, e.g.:
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,
Expand All @@ -62,8 +60,6 @@ or just source them in directly:
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")
}
Expand Down
4 changes: 2 additions & 2 deletions docs/content/en/commands/hugo_gen_autocomplete.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ for convenience, and the command may need superuser rights, e.g.:
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,
Expand All @@ -37,7 +37,7 @@ hugo gen autocomplete [flags]
```
--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
Expand Down

0 comments on commit a7c515e

Please sign in to comment.