22 lines
617 B
PowerShell
22 lines
617 B
PowerShell
[CmdletBinding(SupportsShouldProcess)]param(
|
|
[Parameter(Position = 0, ValueFromRemainingArguments)]
|
|
[ArgumentCompleter({ param (
|
|
$commandName,
|
|
$parameterName,
|
|
$wordToComplete,
|
|
$commandAst,
|
|
$fakeBoundParameters
|
|
)
|
|
[MyConfig]::_GetValidValues($wordToComplete,$true) | Sort-Object
|
|
})]
|
|
[string[]]$ConfigName,
|
|
[switch]$Force
|
|
)
|
|
if( -not $ConfigName ) {
|
|
([MyConfig]::_GetValidValues('',$true)) | Sort-Object
|
|
return
|
|
}
|
|
$local:ScriptPaths = [MyConfig]::GetConfigPaths($ConfigName,$Force)
|
|
|
|
Edit-TextFile $ScriptPaths
|