PtyOptions

constructor(command: List<String> = defaultCommand(), environment: Map<String, String> = defaultEnvironment(), workingDirectory: Path? = Path.of(System.getProperty("user.home")), columns: Int = 80, rows: Int = 24, treatAmbiguousAsWide: Boolean = false, inputPolicy: TerminalInputPolicy = defaultInputPolicy(), maxHistory: Int = 1000, readBufferSize: Int = 8192, readerThreadName: String = "terminal-pty-reader", watcherThreadName: String = "terminal-pty-watcher", eventListener: PtyEventListener = PtyEventListener.NONE, hostPolicy: HostPolicy = HostPolicy())

Parameters

command

command and arguments passed to the PTY child process.

environment

environment variables for the child process. TERM and COLORTERM default to the shared terminal capability identity when the caller does not provide them.

workingDirectory

initial process working directory, or null to let PTY4J use its platform default.

columns

initial terminal width in cells.

rows

initial terminal height in rows.

treatAmbiguousAsWide

whether East Asian Ambiguous codepoints occupy two cells in the core width policy for future writes.

inputPolicy

host-bound input encoding policy. Local PTY sessions default Return/Enter to CR even when LNM is active, because contemporary PTY line disciplines can otherwise turn DEC CR LF into an extra newline.

maxHistory

maximum scrollback lines retained by the core buffer.

readBufferSize

buffer size used by the PTY stdout reader thread.

readerThreadName

name for the daemon PTY stdout reader thread.

watcherThreadName

name for the daemon process exit watcher thread.

eventListener

host callbacks for parser-discovered PTY metadata events such as BEL and title changes.

hostPolicy

safety policy for terminal-triggered host actions.