MacOS右键助手 Ghostty 打开新窗口

在 MacOS 上打开 Ghostty 总是 新标签打开,换成新窗口又不能进入路径。所以使用 AppleScript 来处理这个:

AppleScript 复制代码
set targetDir to do shell script "p=@rfpath; 
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
相关推荐
fengye2071613 小时前
实验:CPython 迭代协议底层验证(`PyObject_GetIter` / `PyIter_Next`)
macos
DevLoom_12 小时前
macOS 命令行 curl/git 报 SSL 证书错误?eMudhra 事件完整修复指南
git·macos·ssl
清水白石00817 小时前
Python 安装与环境配置:Windows、macOS、Linux 完整指南(第2集)
windows·python·macos
hhhjhl18 小时前
开源鸿蒙平台 CMP 三方库「compose-macos-26-ui」适配全流程
macos·开源·harmonyos
七牛云行业应用1 天前
DeepSeek Harness(dsh)安装完整指南:Windows、macOS、Linux 三平台 + 桌面端与 Web 端全覆盖
linux·windows·macos·ai·ai编程
全栈探索者2 天前
一枚 162MB 的挂件,改写一只猫的画风:LoRA 实战——风格定制与人脸保持
人工智能·macos·lora·aigc·stablediffusion·comfyui
福大大架构师每日一题2 天前
ollama v0.40.11发布:macOS原生语音生成上线,d3决策模型正式加入
macos·策略模式
小天源2 天前
智叟云集系统:便携部署、MAC 授权与交付排障
macos
Joy T2 天前
voice-dump-to-todo:把混乱的语音整理成可执行待办,一个实用的 Agent Skill
ide·macos·语音识别·xcode·任务管理·自研skill
JPower_mr.g2 天前
SmartCall v1.0.9 发布:智能体知识库上线,让 AI 客服先查资料再回答
java·ide·人工智能·macos·架构·开源·xcode