Added DockerCompose completion + fixes
This commit is contained in:
parent
b5b5702b17
commit
d441492cf0
24 changed files with 207 additions and 147 deletions
|
@ -1,19 +1,12 @@
|
|||
[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,
|
||||
[switch]$Force,
|
||||
[switch]$OneLine,
|
||||
[Parameter(Position = 0, ValueFromRemainingArguments = $true, mandatory)]
|
||||
[Parameter(Position = 0, mandatory, ValueFromRemainingArguments = $true)]
|
||||
[ArgumentCompleter({Invoke-Command -ScriptBlock $_DockerComposeCompleter -ArgumentList $args})]
|
||||
[array]$CliParams
|
||||
)
|
||||
|
||||
|
@ -110,7 +103,7 @@ foreach( $local:p in $CliParams ) {
|
|||
}
|
||||
|
||||
$local:dcParams=@()
|
||||
$local:dcParams = $p | Where-Object { $_ } | ForEach-Object {
|
||||
$local:dcParams += $p | Where-Object { $_ } | ForEach-Object {
|
||||
if( $_ -match "(?:^'[^']+'$)|(?:^`"[^`"]+`"$)|(?:^[^\s]+$)" ) { $_ }
|
||||
else { "'$($_.Replace( "'", "''" ))'" }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue