Cross-Platform Shell Support
Kangentic spawns Claude Code processes in platform-native shells. This page documents how shells are detected, adapted, and configured across platforms.
Shell Detection Order
Section titled “Shell Detection Order”Kangentic auto-detects the user’s shell in the following order:
| Platform | Detection Order |
|---|---|
| Windows | PowerShell 7 (pwsh) → PowerShell 5 (powershell) → Git Bash (bash) → cmd.exe |
| macOS | zsh → bash → fish → nushell → sh (default: $SHELL or zsh) |
| Linux | bash → zsh → fish → dash → nushell → ksh → sh (default: $SHELL or bash) |
Override the detected shell in Settings under the Terminal tab, or set terminal.shell in the config file.
Shell-Specific Adaptations
Section titled “Shell-Specific Adaptations”Kangentic adapts command execution for each shell:
| Shell | Adaptation |
|---|---|
| PowerShell | Commands are prefixed with & for proper invocation |
| WSL Bash | Windows paths are converted to /mnt/c/... format |
| fish | No --login flag (fish doesn’t support it) |
| nushell | No --login flag |
| dash | Standard POSIX invocation |
| bash/zsh | Standard --login invocation |
Path Handling
Section titled “Path Handling”Cross-platform path handling uses two key utilities:
toForwardSlash()
Section titled “toForwardSlash()”Converts Windows backslashes to forward slashes for consistent path handling across platforms. Used when passing paths to shells and CLI tools.
quoteArg()
Section titled “quoteArg()”Properly escapes and quotes arguments for the target shell. Handles spaces, special characters, and platform-specific quoting rules.
Git Bash Paths
Section titled “Git Bash Paths”When running under Git Bash on Windows, paths like /c/Users/... are used instead of C:\Users\.... Kangentic detects Git Bash and adjusts path formatting accordingly.
WSL Paths
Section titled “WSL Paths”For WSL shells, Windows paths are converted using the /mnt/ prefix:
C:\Users\project→/mnt/c/Users/project
WSL Support
Section titled “WSL Support”Kangentic detects WSL shells and applies special handling:
- Detection: Checks for WSL-specific environment variables and
/mnt/path patterns - Docker filtering: WSL Docker Desktop distributions are filtered out of the shell list
- Path conversion: Automatic bidirectional path conversion between Windows and WSL formats
Environment Stripping
Section titled “Environment Stripping”When spawning Claude Code processes, Kangentic strips the CLAUDECODE environment variable from the child process environment. This prevents nested Claude Code detection issues.
AUMID Handling (Windows)
Section titled “AUMID Handling (Windows)”On Windows, Kangentic sets the Application User Model ID (AUMID) for proper taskbar grouping and notification association:
| Context | AUMID |
|---|---|
| Development | com.kangentic.dev |
| Production | com.kangentic.app |
This ensures development and production instances have separate taskbar entries and notification channels.
macOS Title Bar
Section titled “macOS Title Bar”On macOS, the custom title bar positions the traffic light buttons (close, minimize, maximize) with specific offsets to align with the app’s header layout. The position is defined in the main process window configuration.