< Day Day Up > |
2.1. Enabling Command-Line Editingbash initially starts interactively with emacs-mode as the default (unless you have started bash with the -noediting option;[2] see Chapter 10). There are two ways to enter either editing mode while in the shell. First, you can use the set command:
$ set -o emacs or: $ set -o vi The second way of selecting the editing mode is to set a readline variable in the file .inputrc. We will look at this method later in this chapter. You will find that the vi- and emacs-editing modes are good at emulating the basic commands of these editors, but not their advanced features; their main purpose is to let you transfer "keyboard habits" from your favorite editor to the shell. fc is quite a powerful facility; it is mainly meant to supplant C shell history and as an "escape hatch" for users of editors other than vi or emacs. Therefore the section on fc is mainly recommended to C shell users and those who don't use either standard editor. |
< Day Day Up > |