Class InfoCmp

java.lang.Object
org.jline.utils.InfoCmp

public final class InfoCmp extends Object
Utility class for terminal capability handling and terminfo database access.

The InfoCmp class provides utilities for working with terminal capabilities and accessing the terminfo database. It includes functionality for parsing terminfo entries, accessing capability values, and formatting capability strings with parameters.

Terminal capabilities are properties that describe what a terminal can do, such as moving the cursor, changing colors, or clearing the screen. These capabilities are typically stored in a terminfo database and are accessed by terminal type (e.g., "xterm", "vt100").

This class defines three types of capabilities:

  • Boolean capabilities - Indicate whether a terminal supports a feature
  • Numeric capabilities - Provide numeric values for terminal properties
  • String capabilities - Define escape sequences for terminal operations

The class is named after the "infocmp" utility found in Unix-like systems, which is used to compare or print terminfo descriptions. It provides similar functionality for accessing and comparing terminal capabilities in Java.

This class is used extensively throughout JLine to determine terminal capabilities and generate appropriate escape sequences for terminal operations.