Merge pull request #1388 from PowerShell/andschwa/default-editmode

Use Emacs as DefaultEditMode on Linux / OS X
This commit is contained in:
Jason Shirk authored and GitHub committed 2016-07-15 15:57:58 -07:00
commit 5a1432e234
5 files changed
+37 -15

No files matched your search

@@ -13,6 +13,16 @@ Describe "PSReadLine" {
$module.Version | Should Be "1.2"
}
It "Should use Emacs Bindings on Linux and OS X" -skip:$IsWindows {
(Get-PSReadLineOption).EditMode | Should Be Emacs
(Get-PSReadlineKeyHandler | where { $_.Key -eq "Ctrl+A" }).Function | Should Be BeginningOfLine
}
It "Should use Windows Bindings on Windows" -skip:(-not $IsWindows) {
(Get-PSReadLineOption).EditMode | Should Be Windows
(Get-PSReadlineKeyHandler | where { $_.Key -eq "Ctrl+A" }).Function | Should Be SelectAll
}
It "Should set the edit mode" {
Set-PSReadlineOption -EditMode Windows
(Get-PSReadlineKeyHandler | where { $_.Key -eq "Ctrl+A" }).Function | Should Be SelectAll