MacOS右键助手 Ghostty 打开新窗口

📅 2026/7/10 6:05:24
MacOS右键助手 Ghostty 打开新窗口
在 MacOS 上打开 Ghostty 总是 新标签打开换成新窗口又不能进入路径。所以使用AppleScript来处理这个set targetDir to do shell script prfpath; if [ -d \$p\ ]; then printf %s \$p\; else dirname \$p\; fi tell application Ghostty set cfg to new surface configuration set initial working directory of cfg to targetDir set win to new window with configuration cfg activate end tell