dco should handle yaml extensions on top of yml
This commit is contained in:
parent
22d1b7a1bc
commit
c8869ae393
2 changed files with 29 additions and 14 deletions
|
@ -12,9 +12,9 @@ class DockerContainer { #: System.Management.Automation.IValidateSetValuesGenera
|
|||
}
|
||||
|
||||
class DockerComposeDirs { #: System.Management.Automation.IValidateSetValuesGenerator {
|
||||
static [string[]] _GetValidValues([string]$wordToComplete,[bool]$Strict) {
|
||||
static [string[]] _GetValidValues([string]$wordToComplete,[string]$Path,[bool]$Strict) {
|
||||
$local:possibleValues = $(
|
||||
Get-ChildItem -Directory -Depth 3 |
|
||||
Get-ChildItem -LiteralPath $Path -Directory -Depth 3 |
|
||||
Where-Object { $_ |
|
||||
Get-ChildItem -Include 'docker-compose.y*l' |
|
||||
Where-Object Extension -in '.yml','.yaml'
|
||||
|
@ -24,6 +24,10 @@ class DockerComposeDirs { #: System.Management.Automation.IValidateSetValuesGene
|
|||
)
|
||||
return $(Get-PossibleArguments -WordToComplete $wordToComplete -FullValueSet $possibleValues -Strict:$Strict );
|
||||
}
|
||||
|
||||
static [string[]] _GetValidValues([string]$wordToComplete,[bool]$Strict) {
|
||||
return [DockerComposeDirs]::_GetValidValues($wordToComplete,'.',$true)
|
||||
}
|
||||
|
||||
[String[]] GetValidValues() {
|
||||
return [DockerComposeDirs]::_GetValidValues('',$true)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue