What can I do with the inputrc file?

What can I do with the inputrc file?

The configuration options in .inputrc are particularly useful for customising the way Tab-completion works, e.g. with the lscommand When a program which uses the Readline library starts up, the init file is read, and the key bindings are set.

What’s the default path for the readline library?

If that variable is unset, the default is ~/.inputrc. If that file does not exist or cannot be read, the ultimate default is /etc/inputrc. When a program which uses the readline library starts up, the init file is read, and the key bindings and variables are set.

How does the startup file in readline work?

The startup file is just a sequence of lines that bind a keyname to a macro or readline function name. You can also place comments in the file by preceding any line with a #. You can use either a mnemonic name or a key escape sequence for the keyname.

Is there a way to edit a line in readline?

The line returned has the final newline removed, so only the text of the line remains. readline offers editing capabilities while the user is entering the line. By default, the line editing commands are similar to those of emacs. A vi-style line editing interface is also available.

What can I do with the readline library?

The Readline library gives you a set of commands for manipulating the text as you type it in, allowing you to just fix your typo, and not forcing you to retype the majority of the line. Using these editing commands, you move the cursor to the place that needs correction, and delete or insert the text of the corrections.

Which is the default setting for readline editing mode?

The editing-modevariable controls which default set of key bindings is used. By default, Readline starts up in Emacs editing mode, where the keystrokes are most similar to Emacs. This variable can be set to either ‘emacs’ or ‘vi’.

Where can I find the GNU readline library?

This document describes the GNU Readline Library, a utility which aids in the consistency of user interface across discrete programs which provide a command line interface. The Readline home page is http://www.gnu.org/software/readline/ .

How to search backward and forward in inputrc?

“\\C-p”:history-search-backward and “\\C-n”:history-search-forward: These two lines set Ctrl – P / Ctrl – N to search backward/forward through the history for the string of characters between the start of the current line and the current cursor position.

What is the syntax of the inputrc variable?

The inputrc variable syntax is simple: set variable value Where variable is one of the following: bell-style Controls what happens when Readline wants to ring the terminal bell. If set to ‘none’, Readline never rings the bell.

What does include in / etc / inputrc do?

Here is the explanation. $include /etc/inputrc: This line carries over site-wide readline configuration to the user configuration. Usually /etc/inputrc includes some goodies.