nao1215 / gup

gup - Update binaries installed by "go install" with goroutines.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Auto-generate PowerShell completion file

nao1215 opened this issue · comments

The gup command generates shell completion files for bash, zsh, and fish.
However, gup does not generate shell completion file for PowerShell.

I do not have Windows, so this task has a very low priority.
I would be happy to have this feature implemented for Windows users!!
There is a function (GenPowerShellCompletionFile()) that generates a shell completion file for PowerShell, so it can be implemented if you know where to generate the file.

// DeployShellCompletionFileIfNeeded creates the shell completion file.
// If the file with the same contents already exists, it is not created.
func DeployShellCompletionFileIfNeeded(cmd *cobra.Command) {
if !isWindows() {
makeBashCompletionFileIfNeeded(cmd)
makeFishCompletionFileIfNeeded(cmd)
makeZshCompletionFileIfNeeded(cmd)
}
}