From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Thu, 14 Jul 2016 18:32:43 -0400 Subject: [U-Boot] common: cli_readline: Improve command line editing In-Reply-To: <1465390186-26157-1-git-send-email-james.byrne@origamienergy.com> References: <1465390186-26157-1-git-send-email-james.byrne@origamienergy.com> Message-ID: <20160714223243.GA16305@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, Jun 08, 2016 at 01:49:46PM +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 This introduces a new warning: common/cli_readline.c: In function ?cli_readline_into_buffer?: common/cli_readline.c:361:4: warning: ?act? may be used uninitialized in this function [-Wmaybe-uninitialized] -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: