readline/README.md

47 lines
2.5 KiB
Markdown
Raw Normal View History

2015-09-20 18:11:30 +03:00
# readline
2015-09-20 18:16:46 +03:00
2015-09-23 08:09:26 +03:00
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](LICENSE.md)
2015-09-23 08:12:20 +03:00
[![Build Status](https://travis-ci.org/chzyer/readline.svg?branch=master)](https://travis-ci.org/chzyer/readline)
2015-09-23 08:09:26 +03:00
[![GoDoc](https://godoc.org/github.com/chzyer/readline?status.svg)](https://godoc.org/github.com/chzyer/readline)
2015-09-23 08:06:47 +03:00
A pure go implementation for gnu readline.
2015-09-23 08:03:18 +03:00
2015-09-23 08:09:26 +03:00
# Demo
![demo](https://raw.githubusercontent.com/chzyer/readline/master/example/demo.gif)
# Shortcut
2015-09-23 08:03:18 +03:00
> `Meta + n` means press `Esc` and `n` separately
| Shortcut | Comment | Support |
2015-09-23 08:05:11 +03:00
|--------------------|-----------------------------------|---------|
2015-09-23 08:03:18 +03:00
| `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`+`R` | Search backwards in history | Yes |
| `Ctrl`+`S` | Search forwards in history | Yes |
| `Ctrl`+`T` | Transpose characters | Yes |
2015-09-23 08:15:00 +03:00
| `Meta`+`T` | Transpose words | No |
2015-09-23 08:03:18 +03:00
| `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 |