19 lines
761 B
PowerShell
19 lines
761 B
PowerShell
class MyConfig { #: System.Management.Automation.IValidateSetValuesGenerator {
|
|
static [hashtable]$configDirectory = [ordered]@{
|
|
'vi' = '~/.virc'
|
|
'vim' = '~/.vimrc','~/.vim/vimrc'
|
|
'neovim' = '~/.config/nvim/init.vim','~/.config/nvim/vim-plug/plugins.vim','#vim','#vi'
|
|
}
|
|
static [string[]] GetConfigPaths([string[]]$ConfigNames) {
|
|
return $null
|
|
}
|
|
static [string[]] _GetValidValues([string]$wordToComplete,[bool]$Strict) {
|
|
$local:possibleValues = [MyConfig]::configDirectory.Keys
|
|
return $(Get-PossibleArguments -WordToComplete $wordToComplete -FullValueSet $possibleValues -Strict:$Strict );
|
|
}
|
|
|
|
[String[]] GetValidValues() {
|
|
return [MyConfig]::_GetValidValues('',$true)
|
|
}
|
|
}
|