aboutsummaryrefslogtreecommitdiff
path: root/completions/powershell/podman.ps1
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2022-06-21 16:57:49 +0200
committerPaul Holzinger <pholzing@redhat.com>2022-06-21 17:17:06 +0200
commit050693b2e773e6334dc200fc0c819e3829ac400d (patch)
tree97a1614b3f622023c5282141157ebdb36d9e7678 /completions/powershell/podman.ps1
parentc8032b99117068018d21f3e1773cdb070fa46279 (diff)
downloadpodman-050693b2e773e6334dc200fc0c819e3829ac400d.tar.gz
podman-050693b2e773e6334dc200fc0c819e3829ac400d.tar.bz2
podman-050693b2e773e6334dc200fc0c819e3829ac400d.zip
bump github.com/spf13/cobra from 1.4.0 to 1.5.0
Update cobra to latest version. Remove workaround for podman -h. Also regenerate the completion scripts. [NO NEW TESTS NEEDED] Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'completions/powershell/podman.ps1')
-rw-r--r--completions/powershell/podman.ps15
1 files changed, 4 insertions, 1 deletions
diff --git a/completions/powershell/podman.ps1 b/completions/powershell/podman.ps1
index 1cd89d0a0..4d94b6fe8 100644
--- a/completions/powershell/podman.ps1
+++ b/completions/powershell/podman.ps1
@@ -44,6 +44,7 @@ Register-ArgumentCompleter -CommandName 'podman' -ScriptBlock {
# Prepare the command to request completions for the program.
# Split the command at the first space to separate the program and arguments.
$Program,$Arguments = $Command.Split(" ",2)
+
$RequestComp="$Program __complete $Arguments"
__podman_debug "RequestComp: $RequestComp"
@@ -73,11 +74,13 @@ Register-ArgumentCompleter -CommandName 'podman' -ScriptBlock {
}
__podman_debug "Calling $RequestComp"
+ # First disable ActiveHelp which is not supported for Powershell
+ $env:PODMAN_ACTIVE_HELP=0
+
#call the command store the output in $out and redirect stderr and stdout to null
# $Out is an array contains each line per element
Invoke-Expression -OutVariable out "$RequestComp" 2>&1 | Out-Null
-
# get directive from last line
[int]$Directive = $Out[-1].TrimStart(':')
if ($Directive -eq "") {