Skip to content

Commit 85bc72a

Browse files
authored
Merge pull request #31 from hymkor/keytable
README: Update the key bindings table
2 parents 4492364 + 4505d01 commit 85bc72a

File tree

2 files changed

+24
-18
lines changed

2 files changed

+24
-18
lines changed

README.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,18 @@ SQL-Bless is the result of that lesson — a tool that values safety over conven
4949

5050
| Key | Binding |
5151
|-----|---------|
52-
| `Enter`, `Ctrl`-`M` | Insert a newline (or execute SQL if line ends with `;` or is a short command[^sc]) |
53-
| `Ctrl`-`Enter`/`J` | Execute SQL |
54-
| `Ctrl`-`F`/`B` | Move Cursor forward or backward |
55-
| `Ctrl`-`N`/`P` | Move Cursor or refer history |
56-
| `Ctrl`-`C` | Exit with rollback |
57-
| `Ctrl`-`D` | Delete character or submit EOF (exit with rollback) |
58-
| `ALT`-`P`, `Ctrl`-`Up`, `PageUp` | Insert the previous SQL (history)|
59-
| `ALT`-`N`, `Ctrl`-`Down`, `PageDown` | Insert the next SQL (history) |
60-
| `TAB` | Table name and column name completion |
52+
| `Enter`, `Ctrl`+`M` | Insert a newline or execute SQL if line ends with `;` or is a short command[^sc] |
53+
| `Ctrl`+`Enter`, `Meta`+`Enter`, `Ctrl`+`J` | Execute SQL |
54+
| ``, `Ctrl`+`F` | Move Cursor forward |
55+
| ``, `Ctrl`+`B` | Move Cursor backward |
56+
| ``, `Ctrl`+`P` | Move cursor to previous line or last line of previous SQL in history |
57+
| ``, `Ctrl`+`N` | Move cursor to next line or first line of next SQL in history |
58+
| `Ctrl`+`D` | Delete character or submit EOF (exit with rollback) |
59+
| `PageUp`, `Ctrl`+``, `Meta`+`P` | Insert the previous SQL (history)|
60+
| `PageDown`, `Ctrl`+``, `Meta`+`N`| Insert the next SQL (history) |
61+
| `Tab` | Table name and column name completion |
62+
63+
`Meta` means either `Alt`+`key` or `Esc` followed by key.
6164

6265
[^sc]: `DESC`, `EDIT`, `EXIT`, `HISTORY`, `HOST`, `QUIT`, `REM`, `SPOOL`, `START`, `\D`
6366

README_ja.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,18 @@ SQL-Bless は、そうした現場での教訓から生まれた、安全で再
4747

4848
| Key | Binding |
4949
|-----|---------|
50-
| `Enter`, `Ctrl`-`M` | 改行(末尾;または短いコマンド[^sc]時はSQLを実行) |
51-
| `Ctrl`-`Enter`/`J` | SQLを実行 |
52-
| `Ctrl`-`F`/`B` | カーソルを前後に移動 |
53-
| `Ctrl`-`N`/`P` | カーソル移動、もしくはヒストリ参照 |
54-
| `Ctrl`-`C` | ロールバックして終了 |
55-
| `Ctrl`-`D` | 一次削除もしくは、EOF:ロールバックして終了 |
56-
| `ALT`-`P`, `Ctrl`-`Up`, `PageUp` | ヒストリ参照(過去方向)|
57-
| `ALT`-`N`, `Ctrl`-`Down`, `PageDown` | ヒストリ参照(未来方向) |
58-
| `TAB` | テーブル名・カラム名補完 |
50+
| `Enter`, `Ctrl`+`M` | 改行(末尾が`;`であるか、明らかに一行未満で終わるコマンド[^sc]時はSQLを実行) |
51+
| `Ctrl`+`Enter`, `Meta`+`Enter`, `Ctrl`+`J` | SQLを実行 |
52+
| ``, `Ctrl`+`F` | カーソルを右へ移動 |
53+
| ``, `Ctrl`+`B` | カーソルを左へ移動 |
54+
| ``, `Ctrl`+`P` | カーソルを上、もしくはヒストリの前のSQLを参照 |
55+
| ``, `Ctrl`+`N` | カーソルを上、もしくはヒストリの後のSQLを参照 |
56+
| `Ctrl`+`D` | 一次削除もしくは、EOF:ロールバックして終了 |
57+
| `PageUp`, `Ctrl`+``, `Meta`+`P`| ヒストリ参照(過去方向) |
58+
| `PageDown`, `Ctrl`+``, `Meta`+`N`| ヒストリ参照(未来方向) |
59+
| `Tab` | テーブル名・カラム名補完 |
60+
61+
`Meta``Alt`+`key`もしくは、`Esc` の後に`key`を押下することを意味します。
5962

6063
[^sc]: `DESC`, `EDIT`, `EXIT`, `HISTORY`, `HOST`, `QUIT`, `REM`, `SPOOL`, `START`, `\D`
6164

0 commit comments

Comments
 (0)