Bash - Text Editing
About
By default, the line editing commands are similar to those of Emacs. A vi-style line editing interface is also available.
Manipulating the text as you type it in.
See:
- for word completion: Bash - Complete (Builtin command) - Completion
- for shortcut: Bash - bind builtin function (Key to function, Shortcut)
Articles Related
Management
Enable
Command line editing is enabled by default when using:
- an interactive shell, unless the –noediting option is supplied at shell invocation.
- the -e option to the read builtin command
Line editing can be enabled at any time using:
- the -o emacs
- or -o vi options
to the set builtin command
Disable
Line editing can be disabled using the +o emacs or +o vi options to set.
Configuration
See Bash - bind builtin function (Key to function, Shortcut)
Library
Command line editing is provided by the Readline library, which is used by several different programs, including Bash.