Ignore case when binding PSReadline keyhandler functions

Fix #4300
This commit is contained in:
Oisin Grehan
2017-08-07 14:24:35 -07:00
committed by Jason Shirk
parent 0b7451bda3
commit 8d3f8537de
3 changed files with 21 additions and 5 deletions
@@ -42,6 +42,12 @@ Describe "PSReadLine" -tags "CI" {
(Get-PSReadLineKeyHandler | Where-Object { $_.Key -ceq "Alt+B" }).Function | Should Be SelectBackwardWord
}
It "Should ignore case when using Function binding" {
$lowerCaseFunctionName = "yank"
Set-PSReadlineKeyHandler "Ctrl+F24" -Function $lowerCaseFunctionName
(Get-PSReadlineKeyHandler | Where { $_.Key -eq "Ctrl+F24"}).Function | Should Be "Yank"
}
AfterAll {
Remove-Module PSReadLine