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
相关推荐
小毛球.5 小时前
第 3 篇:IDEA 最新版下载与完整安装教程(Mac)
java·macos·intellij-idea·idea
CodeClimb2 天前
Mac 磁盘无法推出(DMG外接盘)排查处理教程
macos
Karl_fang2 天前
🥳 再也不用拿起手机抄验证码!我做了一个 Android → Mac 的「验证码接力」工具
前端·macos·ai编程
csdn_aspnet4 天前
macOS 10 、Docker 玩轉 MySQL
运维·mysql·macos·docker·容器·mac
秋雨梧桐叶落莳4 天前
【iOS】Block底层详解
macos·ios·cocoa
高调的涵涵5 天前
café 和 café 不是一个文件名
macos
独隅8 天前
WebStorm macOS 安装部署与高效调优完全指南
ide·macos·webstorm
独隅8 天前
WebStorm macOS 安装调优与实战效能全景
ide·macos·webstorm
2601_967987378 天前
安装 Redis 或 Redis Stack
linux·windows·redis·macos·安装
高调的涵涵8 天前
1GB 文件,df 说没占地方
macos