Skip to Content
Learning the bash Shell, Second Edition
book

Learning the bash Shell, Second Edition

by Cameron Newham, Bill Rosenblatt
January 1998
Beginner
336 pages
10h 6m
English
O'Reilly Media, Inc.
Content preview from Learning the bash Shell, Second Edition

emacs Editing Mode

If you are an emacs user, you will find it most useful to think of emacs editing mode as a simplified emacs with a single, one-line window. All of the basic commands are available for cursor motion, cut-and-paste, and search.

Basic Commands

emacs-mode uses control keys for the most basic editing functions. If you aren’t familiar with emacs, you can think of these as extensions of the rudimentary “erase” character (usually BACKSPACE or DEL) that UNIX provides through its interface to users’ terminals. For the sake of consistency, we’ll assume your erase character is DEL from now on; if it is CTRL-H or something else, you will need to make a mental substitution. The most basic control-key commands are shown in Table 2.1. (Important: remember that typing CTRL-D when your command line is empty may log you off!) The basic keyboard habits of emacs-mode are easy to learn, but they do require that you assimilate a couple of concepts that are peculiar to the emacs editor.

Table 2-1. Basic emacs-Mode Commands

Command Description
CTRL-BMove backward one character (without deleting)
CTRL-FMove forward one character
DELDelete one character backward
CTRL-DDelete one character forward

The first of these is the use of CTRL-B and CTRL-F for backward and forward cursor motion. These keys have the advantage of being obvious mnemonics. You can also use the left and right cursor motion keys (“arrow” keys), but for the rest of this discussion we will use the control keys, as ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning the bash Shell, 3rd Edition

Learning the bash Shell, 3rd Edition

Cameron Newham

Publisher Resources

ISBN: 1565923472Supplemental ContentCatalog PageErrata