Package org.aesh.terminal.utils
Class InfoCmpHelper
java.lang.Object
org.aesh.terminal.utils.InfoCmpHelper
Helper class for retrieving terminal capabilities from the terminfo database.
- Author:
- Ståle W. Pedersen
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetCurrentTranslatedCapability(String cap, String defaultValue) Get a terminal capability as a string.static int[]getCurrentTranslatedCapabilityAsInts(String cap, int[] defaultValue) Get a terminal capability as an array of code points.
-
Method Details
-
getCurrentTranslatedCapabilityAsInts
Get a terminal capability as an array of code points. The capability is looked up from the terminfo database for the current terminal.- Parameters:
cap- the capability name to look updefaultValue- the default value to return if the capability is not found- Returns:
- the capability value as an int array, or the default value
-
getCurrentTranslatedCapability
Get a terminal capability as a string. The capability is looked up from the terminfo database for the current terminal, which is determined by the TERM environment variable (defaults to xterm-256color).- Parameters:
cap- the capability name to look updefaultValue- the default value to return if the capability is not found- Returns:
- the capability value as a string, or the default value
-