Go package that provides terminal bridging utilities for cmdIDE. Handles platform-specific concerns such as suppressing console windows on Windows and resolving the default working directory for new terminal sessions.
import term "github.com/Command-IDE/terminal"Suppresses the console window that Windows would otherwise flash when spawning a background child process (CREATE_NO_WINDOW = 0x08000000). No-op on macOS and Linux.
Returns the best starting directory for a new terminal session. Checks (in order):
- The user-supplied
configDefaultpath (if non-empty and exists) - The Documents folder (Windows: from the registry; macOS/Linux:
~/Documents) - The user's home directory
| File | Tag | Purpose |
|---|---|---|
exec_windows.go |
windows |
CREATE_NO_WINDOW syscall |
exec_other.go |
!windows |
no-op stub |
defaultdir_windows.go |
windows |
Registry-based Documents lookup |
defaultdir_other.go |
!windows |
POSIX Documents lookup |
golang.org/x/sys— Windows registry access for the Documents folder path
This package is a sub-module of cmdIDE and is consumed via a replace directive in the host app's go.mod during development.
MIT