Commit Graph

54 Commits

Author SHA1 Message Date
Thomas Bradford 707fd8ecaa intercept line rendering using a 'Painter' () 2017-10-01 22:58:28 -05:00
Sagar Mittal 9f56defe66 Add barebones support for yank/paste () 2017-10-01 22:57:50 -05:00
Paul Tagliamonte 41eea22f71 Add two API methods to set RuneBuffer state before prompting the user ()
* Expose RuneBuffer.Set through Operation's API

This allows a user to prefill a line before the user is given a prompt,
so that you can provide a default, user-editable input line.

* Add a Instance.ReadlineWithDefault API method

This will pre-fill the Operation.RuneBuffer with text before prompting
the user, and provide her with a method to edit the provided default.
2017-03-14 07:49:21 +08:00
Jiří Setnička f892600c35 Ability to filter out input runes ()
Could be used to mask/disable some actions (like Ctrl-Z, or searching by
Ctrl-R and Ctrl-S)
2017-02-20 09:51:01 +08:00
chzyer 27fdf0b285 Fix: a backup plan when can't get size of terminal ()
* fix (0,0) size

* fix
2016-08-31 23:51:28 +08:00
chzyer b411b0f4b2 fixes: flush chars if got io.EOF without '\n' () 2016-06-19 23:06:37 +08:00
Steven Oud 92c174e5fb Add ClearScreen operation on Ctrl+L ()
* Add ClearScreen operation on Ctrl+L

* Remove TODO from clear screen in readme

* Don't use external command for ClearScreen

* Remove duplicate ClearScreen function
2016-05-16 17:59:35 +08:00
chzyer 3ea5940c39 support suspend process ()
* support suspend process

* fix suspend in windows

* add comments
2016-04-17 21:05:00 +08:00
chzyer 218eb7fff6 [example] Add a IM example 2016-03-31 10:55:53 +08:00
chzyer 1e409caaf3 return remain line if interrupt. 2016-03-25 17:08:13 +08:00
chzyer b57eccfd02 add remote mode 2016-03-13 18:32:48 +08:00
Cheney 867002449c refactory 2016-03-05 15:45:42 +08:00
Lu Guanqun d45b1ac5fc add a new API to set auto complete 2016-02-23 13:15:23 +08:00
Cheney 15e7be4ac2 add new interface and fixed crash if stdout isn't a tty 2016-02-18 11:25:41 +08:00
Cheney 6368045a0b report error if it save history fail 2016-02-18 08:41:35 +08:00
Cheney 21acaf90fd fixed crash if stdin is not a tty (pipe) 2016-02-17 14:08:55 +08:00
Cheney 07485bbd8f update history interfaces. and support DisableAutoSaveHistory 2016-02-16 16:56:57 +08:00
Cheney 01cffb6cb2 support unique edit line 2016-02-15 10:03:41 +08:00
Ryan Hileman 05d3fbcc2a add stdin remapping support 2015-12-23 21:54:46 -08:00
Cheney 839c0013a8 example: update 2015-11-20 21:00:05 +08:00
Cheney 71e9536f4b add password support 2015-11-20 20:56:42 +08:00
Cheney db2e5eae91 fix bugs: reset buffer after trigger io.EOF/ErrInterrupt 2015-11-20 11:25:30 +08:00
Cheney 7a18498f5b treat `Ctrl+D` + EmptyLine = EOF, `Ctrl+C` = ErrInterrupt 2015-11-19 11:55:07 +08:00
Cheney 5ee706df9b only enter raw mode when calling Readline() 2015-11-09 11:20:26 +08:00
Cheney bfa8c1dfdb add history limitation 2015-10-04 15:23:00 +08:00
Cheney 4dc2ce7141 fixes crash in nil completer 2015-10-03 14:15:19 +08:00
Cheney 879224ddc9 refactor 2015-10-02 10:37:21 +08:00
Cheney 79d1bf27b4 add simple vim mode 2015-10-01 22:44:43 +08:00
Cheney 3ccecf626d add readpassword 2015-09-30 14:16:46 +08:00
Cheney 9edb463230 add windows api, ansi writer 2015-09-29 17:49:58 +08:00
Cheney d4826eb059 add ansi writer 2015-09-29 00:26:49 +08:00
Cheney 03d201ab65 add Ctrl+U 2015-09-28 11:13:39 +08:00
Cheney 7537bea372 add set prompt 2015-09-27 18:54:26 +08:00
Cheney 6a53e6406c remove test code 2015-09-27 10:22:53 +08:00
Cheney a81fb5db7a fixed not working in screen 2015-09-27 10:12:15 +08:00
Cheney d4ceb57901 let stdout/stderr io.Writer configurable 2015-09-27 09:04:50 +08:00
Cheney 75bbfa6d42 update demo 2015-09-26 01:01:20 +08:00
Cheney 04f86e9c53 add auto complete 2015-09-25 22:56:00 +08:00
Cheney 69871d9ae0 update readme 2015-09-25 12:59:36 +08:00
Cheney af66dc48f7 fix Ctrl+C in search mode do not send EOF 2015-09-25 00:49:55 +08:00
Cheney a904b314b8 kickoff ioloop only needs, solved 2015-09-25 00:16:49 +08:00
Cheney 0de649aeb5 fix searchmode disappear in wrapWriter.Write 2015-09-23 14:04:30 +08:00
Cheney 3c4b5dd53d rename 2015-09-23 13:52:26 +08:00
Cheney bfdaae1594 fix typo 2015-09-23 13:03:13 +08:00
Cheney 4ab9a96399 refactor 2015-09-23 11:46:56 +08:00
Cheney a7f498f047 fix fwd/bck search 2015-09-23 11:10:36 +08:00
Cheney 3b1cf6b8fb add fwd/bck search 2015-09-22 23:01:15 +08:00
Cheney 3f23122fec support save history item 2015-09-22 18:16:24 +08:00
Cheney c8f8ec4b96 refactor runebuffer 2015-09-22 17:41:14 +08:00
Cheney c9aba7b858 fix deleteword/kill 2015-09-21 22:51:48 +08:00