Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
This page provides information to users that are running programs that are utilizing JLine for command line editing. JLine behavior can be customized by embedding programs, such as remapping keys to different functionality or enabling and disabling specific features, so not everything here may apply to the program that you are using.
Upon startup, JLine looks for and attempts to read the file $HOME/.jline.rc. This file can contain set of configuration properties that can change specific aspects of JLine's behavior. These settings are covered in detail, on the Configuration Properties page.
Next, the file $HOME/.inputrc is read. The format and definition of this file is defined by GNU Readline and is documented here.. For the majority of users, this file is not necessary or is usually used to specify the default editing mode with:
set editing-mode emacs
set editing-mode vi
However, JLine does attempt honor as many of the settings in your .inputrc file as possible, including conditional settings (for example, binding a specific key only if being run withing a specific program).
Unless a specific terminal type was specified in your .jline.rc file, JLine will attempt to determine your terminal type and configure itself accordingly. In most circumstances, this should work just fine, however if issues are encountered (e.g. your arrow keys don't work), please see the page on terminal configuration.
Finally, many programs will also load the command line history from previous sessions so that you may immediately recall old history, however this behavior is not enforced by JLine and the embedding program may store these history files in any locations or forms.
History and Command Line Editing
As discussed in the previous section, JLine may be configured with one of two key bindings: emacs or vi. JLine attempts to mimic as much of the behavior of GNU Readline as possible with respect to these modes, so for details on how to use either of these modes, please refer to the Readline documentation for details. However, suffice it to say that all of the standard keys, such as arrow keys, backspace, delete, home, end, etc. should function as expected.
While JLine supports many of the "common" features of readline, it is not a complete clone and is currently missing a number of features. It is hoped that eventually JLine will become as feature-for-feature compatible with readline as possible, but until then, here is a list of the most visible incomplete features: