From d658160bddb021fa7747c7920de931d8ef8e68c3 Mon Sep 17 00:00:00 2001 From: Jan Kuehle Date: Mon, 17 Dec 2018 23:20:45 +0000 Subject: [PATCH] Add markdown file explaining support for PowerShell --- powershell_completions.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 powershell_completions.md diff --git a/powershell_completions.md b/powershell_completions.md new file mode 100644 index 00000000..afed8024 --- /dev/null +++ b/powershell_completions.md @@ -0,0 +1,14 @@ +# Generating PowerShell Completions For Your Own cobra.Command + +Cobra can generate PowerShell completion scripts. Users need PowerShell version 5.0 or above, which comes with Windows 10 and can be downloaded separately for Windows 7 or 8.1. They can then write the completions to a file and source this file from their PowerShell profile, which is referenced by the `$Profile` environment variable. See `Get-Help about_Profiles` for more info about PowerShell profiles. + +# What's supported + +- Completion for subcommands using their `.Short` description +- Completion for non-hidden flags using their `.Name` and `.Shorthand` + +# What's not yet supported + +- Command aliases +- Required, filename or custom flags (they will work like normal flags) +- Custom completion scripts