diff options
author | Stefan Zegenhagen <[email protected]> | 2013-07-15 17:03:07 +0200 |
---|---|---|
committer | Fredrik Gustafsson <[email protected]> | 2013-08-07 10:05:04 +0200 |
commit | 02909c3eaa2b4e636e0f17b24c527879cfc1bdcd (patch) | |
tree | 14ecf55bfaf35011b315e4ebcd39c4328d126662 /erts/doc/src/tty.xml | |
parent | 3021fca734f71f8bae966ab67f1400d37f8927bc (diff) | |
download | otp-02909c3eaa2b4e636e0f17b24c527879cfc1bdcd.tar.gz otp-02909c3eaa2b4e636e0f17b24c527879cfc1bdcd.tar.bz2 otp-02909c3eaa2b4e636e0f17b24c527879cfc1bdcd.zip |
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: [email protected]
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 <[email protected]>
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:
- <CTRL>+W : backward kill word
- <CTRL>+U : backward kill line
- <HOME> : goto start of line
- <END> : goto end of line
- <CTRL>+<LEFT> : backward word
- <CTRL>+<RIGHT> : forward word
It seems that the <CTRL>+<LEFT|RIGHT> 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.
Diffstat (limited to 'erts/doc/src/tty.xml')
-rw-r--r-- | erts/doc/src/tty.xml | 26 |
1 files changed, 25 insertions, 1 deletions
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,7 +47,7 @@ <section> <title>Normal Mode</title> <p>In normal mode keystrokes from the user are collected and interpreted by <c><![CDATA[tty]]></c>. Most of the <em>emacs</em> line editing commands are supported. The following is a complete list of the supported line editing commands.<br></br></p> - <p><em>Note:</em> The notation <c><![CDATA[C-a]]></c> means pressing the control key and the letter <c><![CDATA[a]]></c> simultaneously. <c><![CDATA[M-f]]></c> means pressing the <c><![CDATA[ESC]]></c> key followed by the letter <c><![CDATA[f]]></c>. + <p><em>Note:</em> The notation <c><![CDATA[C-a]]></c> means pressing the control key and the letter <c><![CDATA[a]]></c> simultaneously. <c><![CDATA[M-f]]></c> means pressing the <c><![CDATA[ESC]]></c> key followed by the letter <c><![CDATA[f]]></c>. <c><![CDATA[Home]]></c> and <c><![CDATA[End]]></c> represent the keys with the same name on the keyboard, whereas <c><![CDATA[Left]]></c> and <c><![CDATA[Right]]></c> represent the corresponding cursor keys. </p> <table> <row> @@ -55,6 +55,10 @@ <cell align="left" valign="middle"><em>Function</em></cell> </row> <row> + <cell align="left" valign="middle">Home</cell> + <cell align="left" valign="middle">Beginning of line</cell> + </row> + <row> <cell align="left" valign="middle">C-a</cell> <cell align="left" valign="middle">Beginning of line</cell> </row> @@ -63,6 +67,10 @@ <cell align="left" valign="middle">Backward character</cell> </row> <row> + <cell align="left" valign="middle">C-Left</cell> + <cell align="left" valign="middle">Backward word</cell> + </row> + <row> <cell align="left" valign="middle">M-b</cell> <cell align="left" valign="middle">Backward word</cell> </row> @@ -75,6 +83,10 @@ <cell align="left" valign="middle">Delete word</cell> </row> <row> + <cell align="left" valign="middle">End</cell> + <cell align="left" valign="middle">End of line</cell> + </row> + <row> <cell align="left" valign="middle">C-e</cell> <cell align="left" valign="middle">End of line</cell> </row> @@ -83,6 +95,10 @@ <cell align="left" valign="middle">Forward character</cell> </row> <row> + <cell align="left" valign="middle">C-Right</cell> + <cell align="left" valign="middle">Forward word</cell> + </row> + <row> <cell align="left" valign="middle">M-f</cell> <cell align="left" valign="middle">Forward word</cell> </row> @@ -95,6 +111,10 @@ <cell align="left" valign="middle">Kill line</cell> </row> <row> + <cell align="left" valign="middle">C-u</cell> + <cell align="left" valign="middle">Backward kill line</cell> + </row> + <row> <cell align="left" valign="middle">C-l</cell> <cell align="left" valign="middle">Redraw line</cell> </row> @@ -111,6 +131,10 @@ <cell align="left" valign="middle">Transpose characters</cell> </row> <row> + <cell align="left" valign="middle">C-w</cell> + <cell align="left" valign="middle">Backward kill word</cell> + </row> + <row> <cell align="left" valign="middle">C-y</cell> <cell align="left" valign="middle">Insert previously killed text</cell> </row> |