TerminalProfileRegistry

class TerminalProfileRegistry(osName: String = System.getProperty("os.name"), environment: Map<String, String> = System.getenv(), pathSeparator: String = File.pathSeparator, executableExists: (Path) -> Boolean = Files::isRegularFile)

Discovers built-in local terminal launch profiles.

Discovery is host-neutral startup work. Render and input hot paths never consult this registry, and UI products may layer their own persisted profile sources on top of these defaults.

Constructors

Link copied to clipboard
constructor(osName: String = System.getProperty("os.name"), environment: Map<String, String> = System.getenv(), pathSeparator: String = File.pathSeparator, executableExists: (Path) -> Boolean = Files::isRegularFile)

Functions

Link copied to clipboard

Returns built-in profiles in menu/default preference order.

Link copied to clipboard
fun configuredProfile(shellPath: String, workingDirectory: Path? = null): TerminalProfile

Builds a TerminalProfile from a user-configured shell path.

Link copied to clipboard

Returns the initial profile. Explicit command-line arguments are preserved as a one-off custom profile so app startup remains scriptable.

Link copied to clipboard

Checks if a shell path is a valid executable file or an executable command on the PATH.