Skip to content

Commit

Permalink
update completion scripts for cobra v1.8.0
Browse files Browse the repository at this point in the history
[NO NEW TESTS NEEDED]

Signed-off-by: Paul Holzinger <[email protected]>
  • Loading branch information
Luap99 committed Nov 6, 2023
1 parent e782883 commit 8f5c46c
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion completions/bash/podman
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ __podman_get_completion_results() {
local requestComp lastParam lastChar args

# Prepare the command to request completions for the program.
# Calling ${words[0]} instead of directly podman allows to handle aliases
# Calling ${words[0]} instead of directly podman allows handling aliases
args=("${words[@]:1}")
requestComp="${words[0]} __complete ${args[*]}"

Expand Down
2 changes: 1 addition & 1 deletion completions/bash/podman-remote
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ __podman-remote_get_completion_results() {
local requestComp lastParam lastChar args

# Prepare the command to request completions for the program.
# Calling ${words[0]} instead of directly podman-remote allows to handle aliases
# Calling ${words[0]} instead of directly podman-remote allows handling aliases
args=("${words[@]:1}")
requestComp="${words[0]} __complete ${args[*]}"

Expand Down
2 changes: 1 addition & 1 deletion completions/fish/podman-remote.fish
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ function __podman_remote_clear_perform_completion_once_result
__podman_remote_debug ""
__podman_remote_debug "========= clearing previously set __podman_remote_perform_completion_once_result variable =========="
set --erase __podman_remote_perform_completion_once_result
__podman_remote_debug "Succesfully erased the variable __podman_remote_perform_completion_once_result"
__podman_remote_debug "Successfully erased the variable __podman_remote_perform_completion_once_result"
end

function __podman_remote_requires_order_preservation
Expand Down
2 changes: 1 addition & 1 deletion completions/fish/podman.fish
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ function __podman_clear_perform_completion_once_result
__podman_debug ""
__podman_debug "========= clearing previously set __podman_perform_completion_once_result variable =========="
set --erase __podman_perform_completion_once_result
__podman_debug "Succesfully erased the variable __podman_perform_completion_once_result"
__podman_debug "Successfully erased the variable __podman_perform_completion_once_result"
end

function __podman_requires_order_preservation
Expand Down
6 changes: 3 additions & 3 deletions completions/powershell/podman-remote.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ filter __podman-remote_escapeStringWithSpecialChars {
$_ -replace '\s|#|@|\$|;|,|''|\{|\}|\(|\)|"|`|\||<|>|&','`$&'
}

[scriptblock]$__podman_remoteCompleterBlock = {
[scriptblock]${__podman_remoteCompleterBlock} = {
param(
$WordToComplete,
$CommandAst,
Expand Down Expand Up @@ -85,7 +85,7 @@ filter __podman-remote_escapeStringWithSpecialChars {

__podman-remote_debug "Calling $RequestComp"
# First disable ActiveHelp which is not supported for Powershell
$env:PODMAN_REMOTE_ACTIVE_HELP=0
${env:PODMAN_REMOTE_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
Expand Down Expand Up @@ -242,6 +242,6 @@ filter __podman-remote_escapeStringWithSpecialChars {
}
}
Register-ArgumentCompleter -CommandName 'podman-remote' -ScriptBlock $__podman_remoteCompleterBlock
Register-ArgumentCompleter -CommandName 'podman-remote' -ScriptBlock ${__podman_remoteCompleterBlock}
# This file is generated with "podman-remote completion"; see: podman-completion(1)
6 changes: 3 additions & 3 deletions completions/powershell/podman.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ filter __podman_escapeStringWithSpecialChars {
$_ -replace '\s|#|@|\$|;|,|''|\{|\}|\(|\)|"|`|\||<|>|&','`$&'
}

[scriptblock]$__podmanCompleterBlock = {
[scriptblock]${__podmanCompleterBlock} = {
param(
$WordToComplete,
$CommandAst,
Expand Down Expand Up @@ -85,7 +85,7 @@ filter __podman_escapeStringWithSpecialChars {

__podman_debug "Calling $RequestComp"
# First disable ActiveHelp which is not supported for Powershell
$env:PODMAN_ACTIVE_HELP=0
${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
Expand Down Expand Up @@ -242,6 +242,6 @@ filter __podman_escapeStringWithSpecialChars {
}
}
Register-ArgumentCompleter -CommandName 'podman' -ScriptBlock $__podmanCompleterBlock
Register-ArgumentCompleter -CommandName 'podman' -ScriptBlock ${__podmanCompleterBlock}
# This file is generated with "podman completion"; see: podman-completion(1)

0 comments on commit 8f5c46c

Please sign in to comment.