Class InputRC

java.lang.Object
org.jline.reader.impl.InputRC

public final class InputRC extends Object
Handles inputrc configuration files for JLine.

This class provides functionality for parsing and applying inputrc configuration files, which are used to customize key bindings and other behavior of the LineReader. The format is compatible with GNU Readline's inputrc files.

Key features include:

  • Binding keys to functions or macros
  • Setting variables that control LineReader behavior
  • Conditional configuration based on terminal type

The configuration is typically loaded from a file specified by the LineReader.INPUT_RC_FILE_NAME variable, but can also be loaded from any input stream.

See Also:
  • Method Details

    • configure

      public static void configure(LineReader reader, URL url) throws IOException
      Configures a LineReader from an inputrc file at the specified URL.

      This method opens the URL and passes the resulting input stream to configure(LineReader, InputStream).

      Parameters:
      reader - the LineReader to configure
      url - the URL of the inputrc file
      Throws:
      IOException - if an I/O error occurs while reading the configuration
    • configure

      public static void configure(LineReader reader, InputStream is) throws IOException
      Configures a LineReader from an inputrc file.

      This method reads configuration commands from the provided input stream and passes them to configure(LineReader, Reader).

      Parameters:
      reader - the LineReader to configure
      is - the input stream containing the configuration
      Throws:
      IOException - if an I/O error occurs while reading the configuration
    • configure

      public static void configure(LineReader reader, Reader r) throws IOException
      Configures a LineReader from an inputrc file.

      This method reads configuration commands from the provided reader and applies them to the LineReader. The format of the input is compatible with GNU Readline's inputrc files.

      Parameters:
      reader - the LineReader to configure
      r - the reader containing the configuration
      Throws:
      IOException - if an I/O error occurs while reading the configuration