【Mac】Macbook Finder 从当前位置快速打开终端

本文介绍了如何在Macbook上创建一个快捷方式,使得在Finder中能快速打开终端。通过新建.scpt文件,将其另存为Application类型,并拖拽到Finder工具栏,用户可以实现一键启动终端。
摘要由CSDN通过智能技术生成

第一步、新建文件保存成 .scpt 文件

 

set cmd to ""
tell application "Finder"
    set theWindow to window 1
    set thePath to (POSIX path of (target of theWindow as alias))
    set cmd to "cd " & "\"" & thePath & "\""
    
end tell

tell application "Terminal"
    activate
    tell application "System Events" to keystroke "t" using command down

    delay 0.5
    do script cmd in window 1
end tell

第二步、双击打开,另存为 Application 类型,这样就会得到一个 .app 文件,把它拉到 Finder 的工具栏。 

 第三步、得到一个 .app 文件,按住 comand 键,把它拉到 Finder 的工具栏。

第四步、点击按钮可以直接打开终端

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值