From 02909c3eaa2b4e636e0f17b24c527879cfc1bdcd Mon Sep 17 00:00:00 2001 From: Stefan Zegenhagen Date: Mon, 15 Jul 2013 17:03:07 +0200 Subject: make edlin understand a few important control keys Hi Fredrik, > I've gotten some feedback from your review, > You need to add documentation under Erts-> "User's Guide" -> "tty - A > command line interface" > > You need to add testcase in interactive_shell_SUITE a simplified > example of how this testcase could look like; > ctrl_w_and_ctrl_u(_Conf) -> > rtnode([{putline,""}, {putline, "2."}, {getline, "2"}, > {putline,"xxx yy"++[$\^w]++"."}, {getline,"xxx"}, {putline,"xxx > yy"++[$\^u]++"z."}, {getline,"z"}],[]). Please find an updated version of the patch attached to this e-mail. I hope that you still accept it via e-mail because the former patch was sent the same way ;-). I have extended the documentation to list the new key combinations and added tests to make sure they work. Kind regards, -- Dr. Stefan Zegenhagen arcutronix GmbH Garbsener Landstr. 10 30419 Hannover Germany Tel: +49 511 277-2734 Fax: +49 511 277-2709 Email: stefan.zegenhagen@arcutronix.com Web: www.arcutronix.com *Synchronize the Ethernet* General Managers: Dipl. Ing. Juergen Schroeder, Dr. Josef Gfrerer - Legal Form: GmbH, Registered office: Hannover, HRB 202442, Amtsgericht Hannover; Ust-Id: DE257551767. Please consider the environment before printing this message. >From ce4b827c78d18f39bb1146fd2959ffd7ae2b4bb6 Mon Sep 17 00:00:00 2001 From: Stefan Zegenhagen Date: Mon, 6 May 2013 14:39:07 +0200 Subject: [PATCH] [EDLIN] support a few more control keys Add support for the following control keys that many users have become accustomed to: - +W : backward kill word - +U : backward kill line - : goto start of line - : goto end of line - + : backward word - + : forward word It seems that the + control key sequences are different between terminal emulators, therefore a few possible combinations were added (similar to how libreadline is configured). Documentation and tests are extended to reflect the new functionality. --- erts/doc/src/tty.xml | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'erts/doc') diff --git a/erts/doc/src/tty.xml b/erts/doc/src/tty.xml index 7d662a2849..15b67c8c7d 100644 --- a/erts/doc/src/tty.xml +++ b/erts/doc/src/tty.xml @@ -47,13 +47,17 @@
Normal Mode

In normal mode keystrokes from the user are collected and interpreted by . Most of the emacs line editing commands are supported. The following is a complete list of the supported line editing commands.

-

Note: The notation means pressing the control key and the letter simultaneously. means pressing the key followed by the letter . +

Note: The notation means pressing the control key and the letter simultaneously. means pressing the key followed by the letter . and represent the keys with the same name on the keyboard, whereas and represent the corresponding cursor keys.

Key Sequence Function + + Home + Beginning of line + C-a Beginning of line @@ -62,6 +66,10 @@ C-b Backward character + + C-Left + Backward word + M-b Backward word @@ -74,6 +82,10 @@ M-d Delete word + + End + End of line + C-e End of line @@ -82,6 +94,10 @@ C-f Forward character + + C-Right + Forward word + M-f Forward word @@ -94,6 +110,10 @@ C-k Kill line + + C-u + Backward kill line + C-l Redraw line @@ -110,6 +130,10 @@ C-t Transpose characters + + C-w + Backward kill word + C-y Insert previously killed text -- cgit v1.2.3 From 1d547bfa39bcdfac29ed7c2eb3bd7a1daab7a9f1 Mon Sep 17 00:00:00 2001 From: Fredrik Gustafsson Date: Tue, 20 Aug 2013 11:54:41 +0200 Subject: erts: fixed documentation regarding tty and arrow keys --- erts/doc/src/tty.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'erts/doc') diff --git a/erts/doc/src/tty.xml b/erts/doc/src/tty.xml index 15b67c8c7d..b16523e085 100644 --- a/erts/doc/src/tty.xml +++ b/erts/doc/src/tty.xml @@ -47,7 +47,7 @@
Normal Mode

In normal mode keystrokes from the user are collected and interpreted by . Most of the emacs line editing commands are supported. The following is a complete list of the supported line editing commands.

-

Note: The notation means pressing the control key and the letter simultaneously. means pressing the key followed by the letter . and represent the keys with the same name on the keyboard, whereas and represent the corresponding cursor keys. +

Note: The notation means pressing the control key and the letter simultaneously. means pressing the key followed by the letter . and represent the keys with the same name on the keyboard, whereas and represent the corresponding arrow keys.

-- cgit v1.2.3