Skip to content

Add configurable terminal application support#73

Open
seidnerj wants to merge 1 commit intojbtule:masterfrom
seidnerj:configurable-terminal-app
Open

Add configurable terminal application support#73
seidnerj wants to merge 1 commit intojbtule:masterfrom
seidnerj:configurable-terminal-app

Conversation

@seidnerj
Copy link
Copy Markdown

Summary

  • Added support for configurable terminal applications via macOS defaults
  • Users can now choose between Terminal.app (default) and iTerm2
  • Configuration via defaults write name.tuley.jay.cd-to cdto-terminal-app -string <value>

Changes

  • Created iTerm.h scripting bridge header for iTerm2 integration
  • Refactored main.m to support multiple terminal applications
  • Added openInTerminal() and openIniTerm() functions for Terminal.app and iTerm2 respectively
  • Implemented defaults key cdto-terminal-app for configuration
  • Updated README.md with configuration examples
  • Updated Xcode project to include new header file

Configuration Options

Supports both friendly names (case-insensitive) and bundle identifiers:

  • "Terminal" or "com.apple.Terminal" - Uses Terminal.app
  • "iTerm", "iTerm2" or "com.googlecode.iterm2" - Uses iTerm2
  • Defaults to Terminal.app if not configured or unrecognized value provided

Implementation Details

  • iTerm2 integration uses AppleScript for reliability
  • Fallback to Terminal.app if iTerm2 fails
  • Maintains all existing functionality (window settings, auto-close, etc.)
  • Tested and builds successfully with Xcode 26.2

Test Plan

  • Compiles successfully with Xcode 26.2.0
  • Binary verified (arm64, 72KB, signed)
  • Defaults system tested with various values
  • Manually tested with Terminal.app
  • Code review for edge cases and fallback behavior

Users can now configure their preferred terminal application via defaults:
- defaults write name.tuley.jay.cd-to cdto-terminal-app -string "Terminal"
- defaults write name.tuley.jay.cd-to cdto-terminal-app -string "iTerm"

Supports both Terminal.app (default) and iTerm2. Accepts app names
(case-insensitive) or bundle identifiers. Falls back to Terminal.app
for unrecognized values.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant