github.com/madlambda/nash@v0.2.2-0.20230113003044-f2284521680b/readline/doc/shortcut.md (about)

     1  ## Readline Shortcut
     2  
     3  `Meta`+`B` means press `Esc` and `n` separately.  
     4  Users can change that in terminal simulator(i.e. iTerm2) to `Alt`+`B`  
     5  Notice: `Meta`+`B` is equals with `Alt`+`B` in windows.
     6  
     7  * Shortcut in normal mode
     8  
     9  | Shortcut           | Comment                           |
    10  | ------------------ | --------------------------------- |
    11  | `Ctrl`+`A`         | Beginning of line                 |
    12  | `Ctrl`+`B` / `←`   | Backward one character            |
    13  | `Meta`+`B`         | Backward one word                 |
    14  | `Ctrl`+`C`         | Send io.EOF                       |
    15  | `Ctrl`+`D`         | Delete one character              |
    16  | `Meta`+`D`         | Delete one word                   |
    17  | `Ctrl`+`E`         | End of line                       |
    18  | `Ctrl`+`F` / `→`   | Forward one character             |
    19  | `Meta`+`F`         | Forward one word                  |
    20  | `Ctrl`+`G`         | Cancel                            |
    21  | `Ctrl`+`H`         | Delete previous character         |
    22  | `Ctrl`+`I` / `Tab` | Command line completion           |
    23  | `Ctrl`+`J`         | Line feed                         |
    24  | `Ctrl`+`K`         | Cut text to the end of line       |
    25  | `Ctrl`+`L`         | Clear screen                      |
    26  | `Ctrl`+`M`         | Same as Enter key                 |
    27  | `Ctrl`+`N` / `↓`   | Next line (in history)            |
    28  | `Ctrl`+`P` / `↑`   | Prev line (in history)            |
    29  | `Ctrl`+`R`         | Search backwards in history       |
    30  | `Ctrl`+`S`         | Search forwards in history        |
    31  | `Ctrl`+`T`         | Transpose characters              |
    32  | `Meta`+`T`         | Transpose words (TODO)            |
    33  | `Ctrl`+`U`         | Cut text to the beginning of line |
    34  | `Ctrl`+`W`         | Cut previous word                 |
    35  | `Backspace`        | Delete previous character         |
    36  | `Meta`+`Backspace` | Cut previous word                 |
    37  | `Enter`            | Line feed                         |
    38  
    39  
    40  * Shortcut in Search Mode (`Ctrl`+`S` or `Ctrl`+`r` to enter this mode)
    41  
    42  | Shortcut                | Comment                                 |
    43  | ----------------------- | --------------------------------------- |
    44  | `Ctrl`+`S`              | Search forwards in history              |
    45  | `Ctrl`+`R`              | Search backwards in history             |
    46  | `Ctrl`+`C` / `Ctrl`+`G` | Exit Search Mode and revert the history |
    47  | `Backspace`             | Delete previous character               |
    48  | Other                   | Exit Search Mode                        |
    49  
    50  * Shortcut in Complete Select Mode (double `Tab` to enter this mode)
    51  
    52  | Shortcut                | Comment                                  |
    53  | ----------------------- | ---------------------------------------- |
    54  | `Ctrl`+`F`              | Move Forward                             |
    55  | `Ctrl`+`B`              | Move Backward                            |
    56  | `Ctrl`+`N`              | Move to next line                        |
    57  | `Ctrl`+`P`              | Move to previous line                    |
    58  | `Ctrl`+`A`              | Move to the first candicate in current line |
    59  | `Ctrl`+`E`              | Move to the last candicate in current line |
    60  | `Tab` / `Enter`         | Use the word on cursor to complete       |
    61  | `Ctrl`+`C` / `Ctrl`+`G` | Exit Complete Select Mode                |
    62  | Other                   | Exit Complete Select Mode                |