
Get-Path updated to support @ notation. MyConfig class updated to resolve Paths before testing. MyScript class will look recursivley - this might need to change again. config.files.json updated to support shell-loading-snippets shell-loading-snippets added, with single line of code to inject into startup shell scripts (.zshrc, .bashrc, .shrc)
16 lines
795 B
PowerShell
16 lines
795 B
PowerShell
class MyScript { #: System.Management.Automation.IValidateSetValuesGenerator {
|
|
static [string[]] _GetValidValues([string]$wordToComplete,[bool]$CurrentOnly,[bool]$Strict) {
|
|
$local:possibleValues = $(
|
|
Get-MyPackages -ReturnFullPath -IncludeRoot -Force:$(-not $CurrentOnly) |
|
|
Get-ChildItem -Recurse -Filter '*.ps1' |
|
|
Select-Object -ExpandProperty FullName | ForEach-Object {
|
|
$_ -replace '\.ps1$','' -replace "$($MyPSScriptRoot -replace '\\',"\\")[/\\]",''
|
|
}
|
|
)
|
|
return $(Get-PossibleArguments -WordToComplete $wordToComplete -FullValueSet $possibleValues -Strict:$Strict );
|
|
}
|
|
|
|
[String[]] GetValidValues() {
|
|
return [MyScript]::_GetValidValues('',$false,$true)
|
|
}
|
|
}
|