The material in this section also appears in Learning the bash Shell by Cameron Newham (O’Reilly).
emacs Mode Commands is a complete list of readline Emacs editing mode commands.
Table A-23. emacs mode commands
Command | Meaning |
---|---|
Ctrl-A | Move to beginning of line. |
Ctrl-B | Move backward one character. |
Ctrl-D | Delete one character forward. |
Ctrl-E | Move to end of line. |
Ctrl-F | Move forward one character. |
Ctrl-G | Abort the current editing command and ring the terminal bell. |
Ctrl-J | Same as Return. |
Ctrl-K | Delete (kill) forward to end of line. |
Ctrl-L | Clear screen and redisplay the line. |
Ctrl-M | Same as Return. |
Ctrl-N | Next line in command history. |
Ctrl-O | Same as Return, then display next line in history file. |
Ctrl-P | Previous line in command history. |
Ctrl-R | Search backward. |
Ctrl-S | Search forward. |
Ctrl-T | Transpose two characters. |
Ctrl-U | Kill backward from point to the beginning of line. |
Ctrl-V | Make the next character typed verbatim. |
Ctrl-V Tab | Insert a Tab. |
Ctrl-W | Kill the word behind the cursor, using whitespace as the boundary. |
Ctrl-X/ | List the possible filename completions of the current word. |
Ctrl-X~ | List the possible username completions of the current word. |
Ctrl-X $ | List the possible shell variable completions of the current word. |
Ctrl-X@ | List the possible hostname completions of the current word. |
Ctrl-X! | List the possible command name completions of the current word. |
Ctrl-X( | Begin saving characters into the current keyboard macro. |
Ctrl-X) | Stop saving characters into the current keyboard macro. |
Ctrl-Xe | Re-execute the last keyboard macro defined. |
Ctrl-X Ctrl-R | Read in the contents of the readline initialization file. |
Ctrl-X Ctrl-V | Display version information on this instance of bash. |
Ctrl-Y | Retrieve (yank) last item killed. |
Delete | Delete one character backward. |
Ctrl-[ | Same as Esc (most keyboards). |
Esc-B | Move one word backward. |
Esc-C | Change word after point to all capital letters. |
Esc-D | Delete one word forward. |
Esc-F | Move one word forward. |
Esc-L | Change word after point to all lowercase letters. |
Esc-N | Nonincremental forward search. |
Esc-P | Nonincremental reverse search. |
Esc-R | Undo all the changes made to this line. |
Esc-T | Transpose two words. |
Esc-U | Change word after point to all uppercase letters. |
Esc-Ctrl-E | Perform shell alias, history, and word expansion on the line. |
Esc-Ctrl-H | Delete one word backward. |
Esc-Ctrl-Y | Insert the first argument to the previous command (usually the second word) at point. |
Esc-Delete | Delete one word backward. |
Esc-^ | Perform history expansion on the line. |
Esc-< | Move to first line of history file. |
Esc-> | Move to last line of history file. |
Esc-. | Insert last word in previous command line after point. |
Esc-_ | Same as above. |
Tab | Attempt filename completion on current word. |
Esc-? | List the possible completions of the text before point. |
Esc-/ | Attempt filename completion on current word. |
Esc-~ | Attempt username completion on current word. |
Esc-$ | Attempt variable completion on current word. |
Esc-@ | Attempt hostname completion on current word. |
Esc-! | Attempt command name completion on current word. |
Esc-Tab | Attempt completion from text in the command history. |
Esc-~ | Attempt tilde expansion on the current word. |
Esc- | Delete all the spaces and Tabs around point. |
Esc-* | Insert all of the completions that would be generated by Esc-= before point. |
Esc-= | List the possible completions before point. |
Esc-{ | Attempt filename completion and return the list to the shell enclosed within braces. |
18.221.35.58