mirror of
https://github.com/containers/podman.git
synced 2025-08-24 10:04:57 +08:00
update completion scripts for cobra v1.8.0
[NO NEW TESTS NEEDED] Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
@ -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[*]}"
|
||||
|
||||
|
@ -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[*]}"
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -10,7 +10,7 @@ filter __podman-remote_escapeStringWithSpecialChars {
|
||||
$_ -replace '\s|#|@|\$|;|,|''|\{|\}|\(|\)|"|`|\||<|>|&','`$&'
|
||||
}
|
||||
|
||||
[scriptblock]$__podman_remoteCompleterBlock = {
|
||||
[scriptblock]${__podman_remoteCompleterBlock} = {
|
||||
param(
|
||||
$WordToComplete,
|
||||
$CommandAst,
|
||||
@ -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
|
||||
@ -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)
|
||||
|
@ -10,7 +10,7 @@ filter __podman_escapeStringWithSpecialChars {
|
||||
$_ -replace '\s|#|@|\$|;|,|''|\{|\}|\(|\)|"|`|\||<|>|&','`$&'
|
||||
}
|
||||
|
||||
[scriptblock]$__podmanCompleterBlock = {
|
||||
[scriptblock]${__podmanCompleterBlock} = {
|
||||
param(
|
||||
$WordToComplete,
|
||||
$CommandAst,
|
||||
@ -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
|
||||
@ -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)
|
||||
|
Reference in New Issue
Block a user