Class InfoCmp
java.lang.Object
org.aesh.terminal.utils.InfoCmp
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetDefaultInfoCmp(String terminal) Get the default built-in terminal capabilities for the specified terminal type.static StringgetInfoCmp(String terminal) Get the terminal capabilities for the specified terminal type.static voidparseInfoCmp(String capabilities, Set<Capability> bools, Map<Capability, Integer> ints, Map<Capability, String> strings) Parse an infocmp capabilities string and populate the provided collections.static voidsetDefaultInfoCmp(String terminal, String caps) Set the default terminal capabilities for a terminal type.
-
Method Details
-
getInfoCmp
Get the terminal capabilities for the specified terminal type. The result is cached for subsequent calls with the same terminal type.- Parameters:
terminal- the terminal type (e.g., "xterm-256color")- Returns:
- the infocmp output for the terminal
- Throws:
IOException- if an I/O error occursInterruptedException- if the thread is interrupted
-
getDefaultInfoCmp
Get the default built-in terminal capabilities for the specified terminal type. This is used as a fallback when the infocmp command is not available.- Parameters:
terminal- the terminal type (e.g., "xterm-256color")- Returns:
- the default capabilities string, or null if not found
-
setDefaultInfoCmp
-
parseInfoCmp
public static void parseInfoCmp(String capabilities, Set<Capability> bools, Map<Capability, Integer> ints, Map<Capability, String> strings) Parse an infocmp capabilities string and populate the provided collections. Boolean capabilities are added to the bools set, integer capabilities to the ints map, and string capabilities to the strings map.- Parameters:
capabilities- the raw capabilities string from infocmpbools- set to populate with boolean capabilitiesints- map to populate with integer capabilitiesstrings- map to populate with string capabilities
-