Keys
Every key at the promptPermalink to Every key at the prompt#
These are all the keys Shale's line editor binds. Keys are written the way Emacs writes them: C- is Control, M- is Meta, which is Alt or Option on most keyboards, or Escape pressed before the key.
To learn how the keys fit together, read Editing a command line.
Keys | What it does |
|---|---|
RET | Run the line. If a parenthesis or quote is still open, start a new line instead, so you can finish it. |
C-j M-RET | Start a new line without running anything. |
TAB | Complete the command or file name at the cursor. Press it again to go through the other matches. |
C-a <home> | Move to the start of the line. |
C-e | On a one-line command, take the whole gray suggestion when there is one. Otherwise, move to the end of the line. |
<end> | Move to the end of the line. |
C-b <left> | Move back one character. |
C-f <right> | Move forward one character, or take the whole suggestion when the cursor is at the end of the line. |
M-b | Move back one word. |
M-f | Move forward one word, or take the next word of the suggestion. |
DEL C-h | Delete the character before the cursor. |
C-d | Delete the character under the cursor. On an empty line, leave Shale. |
<delete> | Delete the character under the cursor. |
C-k | Cut from the cursor to the end of the line. |
C-u | Cut from the start of the line to the cursor. |
C-w M-DEL | Cut the word before the cursor. |
M-d | Cut the word after the cursor. |
C-y | Paste the text you cut most recently. |
M-y | Right after pasting, swap what you pasted for the text you cut before it. |
C-p <up> | Move up a line, or show the previous line from your history. |
C-n <down> | Move down a line, or show the next line from your history. |
C-r | Search your history. Press it again for an older match. |
C-g ESC | Leave a history search and go back to the line you were editing. |
C-c | Throw away the line and start a new prompt. During a history search, leave the search instead. |