+ Don't flush characters when switching into and out of raw mode. This
avoids eating characters that follow '\n'. (Such characters can occur
when pasting multiple line input, or when scripts are driving input.)
+ Try to be slightly cleverer about calculating the length of the prompt,
so that prompts with embedded '\n' characters are handled OK. This is
an area that really needs to be replaced with a query of the cursor
position from the terminal.
+ As a hack, just assume the screen is very wide if we don't know how
wide it is. This allows dexpropt to work correctly. (It was getting
confused by the editing commands emitted when the end-of-line was reached.)
Change-Id: I988dd0f0bceb22b298e915be0dde085c9358ef66
The linenoise library is from http://github.com/antirez/linenoise
This patch also disables command-line editing and history from adb. The
adb implementation was shadowing the Android shell's implementation.
The adb implementation was also shadowing the editing and history
implementation in alternative shells such as BusyBox's ash.
Change-Id: I7ebd4cb391d0ce966c0ce0e707d80ecd659f9079