[U-Boot] [U-Boot, v3] common: cli_readline: Improve command line editing

Tom Rini trini at konsulko.com
Sun Aug 21 17:08:50 CEST 2016


On Tue, Aug 16, 2016 at 06:16:28PM +0100, James Byrne wrote:

> This improves the cread_line() function so that it will correctly
> process the 'Home', 'End', 'Delete' and arrow key escape sequences
> produced by various terminal emulators. This makes command line editing
> a more pleasant experience.
> 
> The previous code only supported the cursor keys and the 'Home' key, and
> only for certain terminal emulator configurations. This adds support for
> the 'End and 'Delete' keys, and recognises a wider range of escape
> sequences. For example, the left arrow key can be 'ESC O D' instead of
> 'ESC [ D', and the 'Home' key can be 'ESC [ H', 'ESC O H', 'ESC 1 ~' or
> 'ESC 7 ~', depending on what terminal emulator you use and how it is
> configured.
> 
> Signed-off-by: James Byrne <james.byrne at origamienergy.com>
> Changes for v2
>    - Explicitly initialize variable to avoid spurious compiler warning.
> Changes for v3
>    - Remove unnecessary setting of 'act' to ESC_REJECT (now its default
>      value).

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160821/292ce255/attachment.sig>


More information about the U-Boot mailing list