From a7c515e1b56e8cab34ca2647b4116904df9c8250 Mon Sep 17 00:00:00 2001 From: Ben Mezger Date: Tue, 2 Feb 2021 20:02:53 -0300 Subject: [PATCH] Refactor: Remove powershell support --- commands/genautocomplete.go | 8 ++------ docs/content/en/commands/hugo_gen_autocomplete.md | 4 ++-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/commands/genautocomplete.go b/commands/genautocomplete.go index b72e5a93054..044a052e69f 100644 --- a/commands/genautocomplete.go +++ b/commands/genautocomplete.go @@ -22,10 +22,8 @@ var _ cmder = (*genautocompleteCmd)(nil) type genautocompleteCmd struct { autocompleteTarget string - - // bash or zsh + // bash, zsh or fish autocompleteType string - *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 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, @@ -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") } diff --git a/docs/content/en/commands/hugo_gen_autocomplete.md b/docs/content/en/commands/hugo_gen_autocomplete.md index fe391630962..033e4fa8203 100644 --- a/docs/content/en/commands/hugo_gen_autocomplete.md +++ b/docs/content/en/commands/hugo_gen_autocomplete.md @@ -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, @@ -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