mirror of
https://github.com/containers/podman.git
synced 2025-08-24 18:12:25 +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
|
local requestComp lastParam lastChar args
|
||||||
|
|
||||||
# Prepare the command to request completions for the program.
|
# 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}")
|
args=("${words[@]:1}")
|
||||||
requestComp="${words[0]} __complete ${args[*]}"
|
requestComp="${words[0]} __complete ${args[*]}"
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ __podman-remote_get_completion_results() {
|
|||||||
local requestComp lastParam lastChar args
|
local requestComp lastParam lastChar args
|
||||||
|
|
||||||
# Prepare the command to request completions for the program.
|
# 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}")
|
args=("${words[@]:1}")
|
||||||
requestComp="${words[0]} __complete ${args[*]}"
|
requestComp="${words[0]} __complete ${args[*]}"
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ function __podman_remote_clear_perform_completion_once_result
|
|||||||
__podman_remote_debug ""
|
__podman_remote_debug ""
|
||||||
__podman_remote_debug "========= clearing previously set __podman_remote_perform_completion_once_result variable =========="
|
__podman_remote_debug "========= clearing previously set __podman_remote_perform_completion_once_result variable =========="
|
||||||
set --erase __podman_remote_perform_completion_once_result
|
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
|
end
|
||||||
|
|
||||||
function __podman_remote_requires_order_preservation
|
function __podman_remote_requires_order_preservation
|
||||||
|
@ -79,7 +79,7 @@ function __podman_clear_perform_completion_once_result
|
|||||||
__podman_debug ""
|
__podman_debug ""
|
||||||
__podman_debug "========= clearing previously set __podman_perform_completion_once_result variable =========="
|
__podman_debug "========= clearing previously set __podman_perform_completion_once_result variable =========="
|
||||||
set --erase __podman_perform_completion_once_result
|
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
|
end
|
||||||
|
|
||||||
function __podman_requires_order_preservation
|
function __podman_requires_order_preservation
|
||||||
|
@ -10,7 +10,7 @@ filter __podman-remote_escapeStringWithSpecialChars {
|
|||||||
$_ -replace '\s|#|@|\$|;|,|''|\{|\}|\(|\)|"|`|\||<|>|&','`$&'
|
$_ -replace '\s|#|@|\$|;|,|''|\{|\}|\(|\)|"|`|\||<|>|&','`$&'
|
||||||
}
|
}
|
||||||
|
|
||||||
[scriptblock]$__podman_remoteCompleterBlock = {
|
[scriptblock]${__podman_remoteCompleterBlock} = {
|
||||||
param(
|
param(
|
||||||
$WordToComplete,
|
$WordToComplete,
|
||||||
$CommandAst,
|
$CommandAst,
|
||||||
@ -85,7 +85,7 @@ filter __podman-remote_escapeStringWithSpecialChars {
|
|||||||
|
|
||||||
__podman-remote_debug "Calling $RequestComp"
|
__podman-remote_debug "Calling $RequestComp"
|
||||||
# First disable ActiveHelp which is not supported for Powershell
|
# 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
|
#call the command store the output in $out and redirect stderr and stdout to null
|
||||||
# $Out is an array contains each line per element
|
# $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)
|
# This file is generated with "podman-remote completion"; see: podman-completion(1)
|
||||||
|
@ -10,7 +10,7 @@ filter __podman_escapeStringWithSpecialChars {
|
|||||||
$_ -replace '\s|#|@|\$|;|,|''|\{|\}|\(|\)|"|`|\||<|>|&','`$&'
|
$_ -replace '\s|#|@|\$|;|,|''|\{|\}|\(|\)|"|`|\||<|>|&','`$&'
|
||||||
}
|
}
|
||||||
|
|
||||||
[scriptblock]$__podmanCompleterBlock = {
|
[scriptblock]${__podmanCompleterBlock} = {
|
||||||
param(
|
param(
|
||||||
$WordToComplete,
|
$WordToComplete,
|
||||||
$CommandAst,
|
$CommandAst,
|
||||||
@ -85,7 +85,7 @@ filter __podman_escapeStringWithSpecialChars {
|
|||||||
|
|
||||||
__podman_debug "Calling $RequestComp"
|
__podman_debug "Calling $RequestComp"
|
||||||
# First disable ActiveHelp which is not supported for Powershell
|
# 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
|
#call the command store the output in $out and redirect stderr and stdout to null
|
||||||
# $Out is an array contains each line per element
|
# $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)
|
# This file is generated with "podman completion"; see: podman-completion(1)
|
||||||
|
Reference in New Issue
Block a user