Readline is a pure go(golang) implementation for GNU-Readline kind library
Go to file
Thomas O'Dowd 8e4bd417b9
Handle keypad mode cursor key escape sequences. (#203)
Normally the terminal uses CSI escape sequences when the UP, DOWN,
LEFT, RIGHT and HOME, END keys are pressed. These look like the
following ESC [ A etc, where ESC [ is the CSI sequence.

xterm and other terminals however can generate an alternative
escape sequence called SS3 if in the application keypad mode.
This sequence is ESC O A etc.

Bash readline understands both modes so nowadays you rarely
see OA being printed when you press the up arrow while the terminal
is using the keypad mode. readline currently does not understand
these sequences.

To test this fix, I used an xterm and put it in keypad mode
using the command "tput smkx". Then I started the readline-demo
and tried using arrow keys. Without this fix, OA is printed when
I press up. With this fix, readline fetches the previous command
as per regular mode. After testing you can escape back to
regular mode using "tput rmkx".
2022-05-20 21:29:21 +08:00
doc update readme 2016-09-02 22:37:16 +08:00
example restore term when receive signal (#200) 2022-04-24 21:25:55 +08:00
runes Fix #43 , remove sub-package for gopkg compatiblity 2016-04-05 09:55:46 +08:00
.gitignore Fix ioloop groutine leaks bug. (#136) 2017-12-08 09:17:16 +08:00
.travis.yml travis: update go version (#128) 2017-10-01 22:55:11 -05:00
CHANGELOG.md correct spelling mistake (#127) 2017-10-01 22:57:10 -05:00
LICENSE Initial commit 2015-09-20 23:11:30 +08:00
README.md AIX support (#175) 2022-04-17 16:50:25 +08:00
ansi_windows.go Add support for bold text. (#106) 2017-10-01 22:59:06 -05:00
complete.go Modify the display width for Chinese characters and so on (#145) 2018-06-03 21:26:55 +08:00
complete_helper.go Dynamic autocompletion (#60) 2016-07-26 21:39:09 +08:00
complete_segment.go [completer] add SegmentAutoComplete 2016-04-12 14:04:56 +08:00
complete_segment_test.go [remote] fix test 2016-04-11 01:54:54 +08:00
go.mod restore term when receive signal (#200) 2022-04-24 21:25:55 +08:00
go.sum restore term when receive signal (#200) 2022-04-24 21:25:55 +08:00
history.go enabling disabling history (#102) 2017-10-02 20:42:28 +08:00
operation.go restore term when receive signal (#200) 2022-04-24 21:25:55 +08:00
password.go Fix panic for ReadPassword (#133) 2017-11-03 21:19:23 +08:00
rawreader_windows.go add comment 2015-10-09 11:13:07 +08:00
readline.go restore term when receive signal (#200) 2022-04-24 21:25:55 +08:00
readline_test.go Bugfix/datarace prompt (#81) 2016-09-15 18:11:25 +08:00
remote.go Fix ioloop groutine leaks bug. (#136) 2017-12-08 09:17:16 +08:00
runebuf.go fix: on linux multine move was not working (#103) 2017-10-02 20:39:53 +08:00
runes.go add HistorySearchFold (#86) 2016-10-03 14:51:04 +08:00
runes_test.go Fix #43 , remove sub-package for gopkg compatiblity 2016-04-05 09:55:46 +08:00
search.go Fix: a backup plan when can't get size of terminal (#71) 2016-08-31 23:51:28 +08:00
std.go Fix ioloop groutine leaks bug. (#136) 2017-12-08 09:17:16 +08:00
std_windows.go finish windows support 2015-09-29 23:28:12 +08:00
term.go Added 'os400' (#201) 2022-04-18 20:41:19 +08:00
term_bsd.go Solaris support (#110) 2017-03-13 07:57:45 +08:00
term_linux.go Solaris support (#110) 2017-03-13 07:57:45 +08:00
term_nosyscall6.go Added 'os400' (#201) 2022-04-18 20:41:19 +08:00
term_unix.go Solaris support (#110) 2017-03-13 07:57:45 +08:00
term_windows.go fix windows compile error 2016-07-22 00:40:16 +08:00
terminal.go Handle keypad mode cursor key escape sequences. (#203) 2022-05-20 21:29:21 +08:00
utils.go Handle keypad mode cursor key escape sequences. (#203) 2022-05-20 21:29:21 +08:00
utils_test.go remove test for SplitByMultiLine 2016-03-31 00:19:18 +08:00
utils_unix.go Added 'os400' (#201) 2022-04-18 20:41:19 +08:00
utils_windows.go Add ClearScreen operation on Ctrl+L (#56) 2016-05-16 17:59:35 +08:00
vim.go Add barebones support for yank/paste (#120) 2017-10-01 22:57:50 -05:00
windows_api.go finish windows support 2015-09-29 23:28:12 +08:00

README.md

Build Status Software License Version GoDoc OpenCollective OpenCollective

A powerful readline library in Linux macOS Windows Solaris AIX

Guide

Repos using readline

cockroachdb robertkrimen/otto empire mehrdadrad/mylg knq/usql youtube/doorman bom-d-van/harp abiosoft/ishell Netflix/hal-9001 docker/go-p9p

Feedback

If you have any questions, please submit a github issue and any pull requests is welcomed :)

Backers

Love Readline? Help me keep it alive by donating funds to cover project expenses!
[Become a backer]

Sponsors

Become a sponsor and get your logo here on our Github page. [Become a sponsor]