People seem to prefer all commands in history, so it seems better to have
fewer options.
The following can be used if the previous functionality is desired:
Set-PSReadlineOption -AddToHistoryHandler { $args[0].Length -gt 3 }
Added a public api to add command lines to PSReadline history.
Use this api when the module is loaded so people that
persist their history can recall those command lines without
any additional changes to their profile.
Support for 2 key chords has been added.
There is a small breaking change in Set-PSReadlineKeyHandler
because the -CtrlX switch is no longer needed. It could have
been left in, but it's better to just remove it - not very
many people use this module yet.
The signature of key handlers was also changed to better support
features that have not yet been implemented. The signature change
shouldn't affect any existing key handlers because default arguments
should cover those cases.
Ctrl+C was being processed by the system - fix was to
change the console mode.
After that, to emulate cooked input mode, we return
to the host with an empty buffer so the input is
preserved and the prompt is evaluated again.
Control keys that weren't bound to actions were ignored to avoid
adding ugly glyphs. Unfortunately with some keyboard layouts,
important keys like '|' are entered with Control.
Fix is to never ignore control keys and display the actual control
sequence like ^P. This means some characters can now span more
than one cell. I haven't done enough work yet to support CJK
characters, hopefully it will be as simple as the couple changes
needed for this fix.
To make it easier to see what keys are bound, you can use the command Get-PSReadlineKeyHandler.
The command Set-PSReadlineKeyHandler also adds support for binding Ctrl-X prefixed commands in Emacs mode.
When the cursor was at the end of the buffer, ShowCompletions would cause an exception trying to move the cursor outside the buffer.
Fixed by writing an explicit newline - done using the native Console api so it isn't redirected by the test framework.