2020-10-31 21:10:32 +00:00
|
|
|
[CmdletBinding(SupportsShouldProcess)]param(
|
|
|
|
[Parameter(Position = 0, ValueFromRemainingArguments)]
|
|
|
|
[ArgumentCompleter({ param (
|
|
|
|
$commandName,
|
|
|
|
$parameterName,
|
|
|
|
$wordToComplete,
|
|
|
|
$commandAst,
|
|
|
|
$fakeBoundParameters
|
|
|
|
)
|
|
|
|
[MyConfig]::_GetValidValues($wordToComplete,$true) | Sort-Object
|
|
|
|
})]
|
|
|
|
[string[]]$ConfigName,
|
2020-11-04 15:58:04 +00:00
|
|
|
[switch]$Force,
|
|
|
|
[switch]$sudo
|
2020-10-31 21:10:32 +00:00
|
|
|
)
|
|
|
|
if( -not $ConfigName ) {
|
|
|
|
([MyConfig]::_GetValidValues('',$true)) | Sort-Object
|
|
|
|
return
|
|
|
|
}
|
|
|
|
$local:ScriptPaths = [MyConfig]::GetConfigPaths($ConfigName,$Force)
|
|
|
|
|
2020-11-04 15:58:04 +00:00
|
|
|
Edit-TextFile -sudo:$sudo $ScriptPaths
|
2020-11-05 04:31:34 +00:00
|
|
|
|
|
|
|
$null = [MyConfig]::_GetValidValues('', $true)
|