Commit Graph

5 Commits

Author SHA1 Message Date
James Byrne fc18e9b3d5 common: cli_readline: Improve command line editing
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@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).
2016-08-20 14:03:24 -04:00
Heiko Schocher 80402f34f8 spl, common, serial: build SPL without serial support
This patch enables building SPL without
CONFIG_SPL_SERIAL_SUPPORT support.

Signed-off-by: Heiko Schocher <hs@denx.de>
[trini: Ensure we build arch/arm/imx-common on mx28]
Signed-off-by: Tom Rini <trini@konsulko.com>
2015-08-12 20:47:13 -04:00
Simon Glass 0098e179e1 Move bootretry code into bootretry.c and clean up
This code is only used by one board, so it seems a shame to clutter up
the readline code with it. Move it into its own file.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-05-29 17:48:21 -04:00
Simon Glass e1bf824dfd Add cli_ prefix to readline functions
This makes it clear where the code resides.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-05-29 17:45:31 -04:00
Simon Glass 6493ccc7cf Split out simple parser and readline into separate files
It doesn't make sense to have the simple parser and the readline code
all in main. Split them out into separate files.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-05-29 17:45:31 -04:00