Class OSUtils
java.lang.Object
org.aesh.terminal.utils.OSUtils
Operating system detection and command utilities.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringPath to the infocmp command.static final booleanTrue if running in a Cygwin, MSYS2, or Git-Bash POSIX environment on Windows.static final booleanTrue if running on HP-UX.static final booleanTrue if running on Linux.static final booleanTrue if running on macOS.static final booleanTrue if running on SunOS/Solaris.static final booleanTrue if running on Windows.static final StringPath to the stty command.static final StringThe -f/-F option for stty based on OS.static final StringPath to the tty command. -
Method Summary
-
Field Details
-
IS_LINUX
public static final boolean IS_LINUXTrue if running on Linux. -
IS_WINDOWS
public static final boolean IS_WINDOWSTrue if running on Windows. -
IS_CYGWIN
public static final boolean IS_CYGWINTrue if running in a Cygwin, MSYS2, or Git-Bash POSIX environment on Windows.Detection uses multiple indicators because no single env var is reliable across all launch contexts (IDE, cmd.exe, PowerShell, mintty):
MSYSTEM— set by MSYS2 and Git-Bash (e.g.,MINGW64,UCRT64)CYGWIN— set in Cygwin environmentsTERM_PROGRAM=mintty— the default Cygwin/MSYS2 terminalPWDstarting with/— legacy heuristic, still valid in many setups
-
IS_OSX
public static final boolean IS_OSXTrue if running on macOS. -
IS_HPUX
public static final boolean IS_HPUXTrue if running on HP-UX. -
IS_SUNOS
public static final boolean IS_SUNOSTrue if running on SunOS/Solaris. -
TTY_COMMAND
Path to the tty command. -
STTY_COMMAND
Path to the stty command. -
STTY_F_OPTION
The -f/-F option for stty based on OS. -
INFOCMP_COMMAND
Path to the infocmp command.
-