Added DockerCompose completion + fixes
This commit is contained in:
parent
b5b5702b17
commit
d441492cf0
24 changed files with 207 additions and 147 deletions
|
@ -1,22 +1,15 @@
|
|||
[CmdletBinding(SupportsShouldProcess)]param(
|
||||
[ArgumentCompleter({ param (
|
||||
$commandName,
|
||||
$parameterName,
|
||||
$wordToComplete,
|
||||
$commandAst,
|
||||
$fakeBoundParameters
|
||||
)
|
||||
[DockerComposeDirs]::_GetValidValues($wordToComplete,$true)
|
||||
})]
|
||||
[ArgumentCompleter({Invoke-Command -ScriptBlock $_DockerComposeDirsCompleter -ArgumentList $args})]
|
||||
[string[]]$ProjectPath,
|
||||
[switch]$Recurse,
|
||||
[int]$Depth=1,
|
||||
[Parameter(Position = 0, ValueFromRemainingArguments = $true)]
|
||||
[ArgumentCompleter({Invoke-Command -ScriptBlock $_DockerComposeCompleter -ArgumentList ($args+@('down'))})]
|
||||
[array]$CliParams=@('--timeout=3','--volumes','--remove-orphans')
|
||||
)
|
||||
|
||||
if( -not $CliParams -or $CliParams[0] -is [string] ) { $CliParams = @($CliParams,@($null)) }
|
||||
$CliParams[0] = @('&','down') + $CliParams[0]
|
||||
$CliParams[0] = @('&') + $CliParams[0]
|
||||
|
||||
Invoke-DockerCompose -ProjectPath $ProjectPath -CliParams $CliParams -Recurse:$Recurse -Depth $Depth
|
||||
Invoke-DockerCompose -ProjectPath $ProjectPath -dcCommand 'down' -CliParams $CliParams -Recurse:$Recurse -Depth $Depth
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue