Created
November 29, 2016 18:44
-
-
Save bielawb/30fd5d9d43d1ac094833bff2a855054b to your computer and use it in GitHub Desktop.
TabExpansion for Should
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Register-ArgumentCompleter -Native -CommandName Should -ScriptBlock { | |
param ($WordToComplete, $CommandAst) | |
$options = @( | |
'Be' | |
'BeExactly' | |
'BeLike' | |
'BeGreaterThan' | |
'BeLessThan' | |
'Contain' | |
'Match' | |
'MatchExactly' | |
'BeNullOrEmpty' | |
'Not' | |
) | |
$options | Where-Object { $_ -like "$WordToComplete*" } | ForEach-Object { | |
[System.Management.Automation.CompletionResult]::new($_) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment