1086 Commits
Author SHA1 Message Date
Jason Shirk c5351ddff7 Remove MinimumHistoryCommandLength
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 }
2013-09-13 08:49:33 -07:00
Jason Shirk 1c75b8e4d5 Read PowerShell history into PSReadline on import
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.
2013-09-12 22:41:34 -07:00
Jason Shirk 0b41d2f4e8 Add Ctrl+End/Ctrl+Home emulation in cmd mode
Ctrl+End deletes to end of line
Ctrl+Home deletes to start of line

Neither puts deleted text in the clipboard/kill ring.
2013-09-12 19:13:08 -07:00
Jason Shirk 74bf36350c Fix cut and paste error that broke Ctrl-C 2013-09-12 06:03:29 -07:00
Jason Shirk 3e23733fd5 Support 2 key chords
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.
2013-09-11 17:55:30 -07:00
Jason Shirk 94b6ad6d4d Add default mapping for Ctrl+C to Emacs mode 2013-09-10 22:52:12 -07:00
Jason Shirk f821898ade Handle Ctrl+C like PowerShell/cmd
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.
2013-09-10 18:35:37 -07:00
Jason Shirk da336b3a86 Make Ding public for use from custom key handlers. 2013-09-10 10:49:30 -07:00
Jason Shirk 24866ac816 Merge branch 'master' of https://github.com/lzybkr/PSReadLine 2013-09-10 10:02:38 -07:00
Jason Shirk 2b948e7227 Support alternate keyboards
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.
2013-09-10 09:26:14 -07:00
Jason Shirk 3be1db0522 Update README.md so it renders properly on GitHub
Added some spaces to work around a bug in rendering - w/o these spaces the text box is empty when viewing the file on GitHub.
2013-09-09 11:22:00 -07:00
Jason Shirk fe93f74ea9 Add license. 2013-09-09 11:02:12 -07:00
Jason Shirk aeef8c5a14 Add Paste from clipboard. 2013-07-22 10:00:33 -07:00
Jason Shirk eb2f41dc47 Script to create release zip file + first release 2013-07-21 23:25:38 -07:00
Jason Shirk d5568c7b17 Update readme to mention help topics. 2013-07-21 15:49:24 -07:00
Jason Shirk d6aea11cdf Add about topic. 2013-07-21 15:49:02 -07:00
Jason Shirk 48772e8be5 Merge branch 'master' of https://github.com/lzybkr/PSReadLine 2013-07-21 15:42:16 -07:00
Jason Shirk db2bc986e7 Update doc comments to reflect reality
Add a key binding for showing completions in cmd mode.
Add an api to set the cursor position.
2013-07-21 15:41:18 -07:00
Jason Shirk 2d5b7ce50f Make this more of a real module. 2013-07-14 00:25:29 -07:00
Jason Shirk ae0a4804a8 Update README. 2013-06-28 11:07:15 -07:00
Jason Shirk a25cef506f Add cursor position as out parameter to GetBufferState. 2013-06-26 19:06:22 -07:00
Jason Shirk d8d9295abd Add api to get token/ast buffer state. 2013-06-19 22:37:57 -07:00
Jason Shirk b7fc7bd191 Merge branch 'master' of https://github.com/lzybkr/PSReadLine 2013-05-24 23:12:46 -07:00
Jason Shirk 4a1341732c Merge pull request #7 from oising/master
consolekeyinfo converter work + tests
2013-05-24 23:12:10 -07:00
Jason Shirk a17d05d644 Add Get-PSReadlineKeyHandler
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.
2013-05-24 19:56:34 -07:00
oising 53714c087f implemented consolekeyinfo converter; added unit tests; tweaked parameters on set-psreadlinehandler 2013-05-24 15:54:07 -04:00
Jason Shirk 50d7464fd2 Test cleanup plus a few new tests. 2013-05-22 22:23:55 -07:00
Jason Shirk 99c6bd650d Fix some more end of buffer problems. 2013-05-19 09:04:40 -07:00
Jason Shirk da207fb3b9 Add function keys. 2013-05-19 09:02:59 -07:00
Jason Shirk d2dcfa37a6 Fix a couple small completion bugs 2013-05-15 12:42:26 -07:00
Jason Shirk 198c53ef19 Fix problem with ShowCompletions at end of buffer
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.
2013-05-15 00:15:16 -07:00
Jason Shirk bc9404b208 Don't insert garbage for non-printable keys.
Function keys and Meta keys should not insert anything if the key is not bound to any action.
2013-05-13 23:28:35 -07:00
Jason Shirk f1f54c2c6c Update README.md 2013-05-13 10:07:11 -06:00
Jason Shirk 2894bc5798 Add useful information to readme. 2013-05-13 09:04:56 -07:00
Jason Shirk 28e07fdb43 Initial checkin. 2013-05-12 23:52:15 -07:00
Jason Shirk 628d0906ea Initial commit 2013-05-12 23:39:30 -07:00