From adde40bb565b4398d330489e61b0ce7332b06923 Mon Sep 17 00:00:00 2001 From: Cheney Date: Wed, 23 Sep 2015 13:03:18 +0800 Subject: [PATCH] improve readme --- README.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/README.md b/README.md index d330df5..185a819 100644 --- a/README.md +++ b/README.md @@ -2,3 +2,38 @@ A pure go implementation for gnu readline. ![demo](https://raw.githubusercontent.com/chzyer/readline/master/example/demo.gif) + +# usage + +> `Meta + n` means press `Esc` and `n` separately + +| Shortcut | Comment | Support | +|--------------------+-----------------------------------+---------| +| `Ctrl`+`A` | Beginning of line | Yes | +| `Ctrl`+`B` / `←` | Backward one character | Yes | +| `Meta`+`B` | Backward one word | Yes | +| `Ctrl`+`C` | Send io.EOF | Yes | +| `Ctrl`+`D` | Delete one character | Yes | +| `Meta`+`D` | Delete one word | Yes | +| `Ctrl`+`E` | End of line | Yes | +| `Ctrl`+`F` / `→` | Forward one character | Yes | +| `Meta`+`F` | Forward one word | Yes | +| `Ctrl`+`G` | Cancel | Yes | +| `Ctrl`+`H` | Delete previous character | Yes | +| `Ctrl`+`I` / `Tab` | Command line completion | No | +| `Ctrl`+`J` | Line feed | Yes | +| `Ctrl`+`K` | Cut text to the end of line | Yes | +| `Ctrl`+`L` | Clean screen | No | +| `Ctrl`+`M` | Same as Enter key | Yes | +| `Ctrl`+`N` / `↓` | Next line (in history) | Yes | +| `Ctrl`+`P` / `↑` | Prev line (in history) | Yes | +| `Ctrl`+`Q` | Resume transmission | No | +| `Ctrl`+`R` | Search backwards in history | Yes | +| `Ctrl`+`S` | Search forwards in history | Yes | +| `Ctrl`+`T` | Transpose characters | Yes | +| `Ctrl`+`U` | Cut text to the beginning of line | No | +| `Ctrl`+`W` | Cut previous word | Yes | +| `Backspace` | Delete previous character | Yes | +| `Meta`+`Backspace` | Cut previous word | Yes | +| `Enter` | Line feed | Yes | +