免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 36439 | 回复: 18
打印 上一主题 下一主题

跪求macosx右键打开终端方法 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-12-23 18:51 |只看该作者 |倒序浏览
买了一macbook,由于本人经常用到命令
每次都点finder->application->terminal完了还要输文件夹路径
问题除了tab键,有没有直接能复制粘贴路径的方法呢?
我去,累死了,有没有像linux那样nautilus-open-terminal
右键打开终端的程序呢?直接进去就是当前目录了,这不省事多了

论坛徽章:
0
2 [报告]
发表于 2011-12-23 22:23 |只看该作者
粘贴复制很简单,终端和图形一样的。看看快捷键吧。

终端可以放到桌面下的一栏,那里专放快捷方式。

论坛徽章:
0
3 [报告]
发表于 2011-12-24 15:48 |只看该作者
本帖最后由 alixkanglu 于 2011-12-24 15:50 编辑

1. Please try to drag the file 2 the Terminal.app Directly!!
See that.

2. And you can use Ctrl + Space too.   Ctrl + Space --> input "Terminal" -->Enter....

3. Using Apple Script to add right clicked function...

论坛徽章:
0
4 [报告]
发表于 2012-02-20 13:25 |只看该作者
直接用search啊(control+空格),然后输入 terminal,搞定

论坛徽章:
0
5 [报告]
发表于 2012-02-26 13:52 |只看该作者
本帖最后由 antonym55 于 2012-02-26 13:58 编辑

右键可能是没办法了,不过可以在无处不在的menu bar 中使用AppleScript,也能达到相同的效果,

在AppleScript Editor 里面新建脚本
将该脚本存放到~/Library/Scripts 里面
当然/Library/Scripts也行
tell application "Finder"
        set sel to selection
        if (count sel) > 0 then
                set myTarget to item 1 of sel
        else if (count window) > 0 then
                set myTarget to target of window 1
        else
                set myTarget to path to desktop folder
        end if
        my openTerminal(myTarget)
end tell

on openTerminal(location)
        set location to location as alias
        set the_path to POSIX path of location
        repeat until the_path ends with "/"
                set the_path to text 1 thru -2 of the_path
        end repeat
       
        set cmd to "cd " & quoted form of the_path & " && echo $'\\ec'"
       
        tell application "System Events" to set terminalIsRunning to exists application process "Terminal"
       
        tell application "Terminal"
                activate
                if terminalIsRunning is true then
                        do script with command cmd
                else
                        do script with command cmd in window 1
                end if
        end tell
end openTerminal
比如将该脚本存为"Open Terminal Here",然后就可以在menu bar 的ActionScript中看到该脚本了,在任何地方执行该脚本就可以打开Terminal了
P.S. 如果你的menu bar没有显示ActionScript图标,需要在AppleScript Editor中设置一下。

论坛徽章:
26
2015亚冠之胡齐斯坦钢铁
日期:2015-06-25 21:40:202015亚冠之柏斯波利斯
日期:2015-08-31 17:03:192015亚冠之柏斯波利斯
日期:2015-11-07 13:10:00程序设计版块每日发帖之星
日期:2015-11-10 06:20:00每日论坛发贴之星
日期:2015-11-10 06:20:00程序设计版块每日发帖之星
日期:2015-11-26 06:20:00程序设计版块每日发帖之星
日期:2015-12-02 06:20:00黄金圣斗士
日期:2015-12-07 17:57:4615-16赛季CBA联赛之天津
日期:2015-12-23 18:34:14程序设计版块每日发帖之星
日期:2016-01-02 06:20:00程序设计版块每日发帖之星
日期:2016-01-06 06:20:00每日论坛发贴之星
日期:2016-01-06 06:20:00
6 [报告]
发表于 2012-03-15 05:24 |只看该作者
搞定

论坛徽章:
1
水瓶座
日期:2014-03-20 18:21:14
7 [报告]
发表于 2012-03-16 02:15 |只看该作者
你把它固定在Dock上不就得了?
为什么一定要右键,而且有好几个linux版本我发现也没有右键,gnome都被他们改疯了

而且最新的lion,可以记忆退出状态,我的终端长年开着,他就一直在那

论坛徽章:
1
水瓶座
日期:2014-03-20 18:21:14
8 [报告]
发表于 2012-03-16 15:10 |只看该作者
或者你可以试一下
Go2Shell
这个小软件

论坛徽章:
0
9 [报告]
发表于 2012-04-06 16:06 |只看该作者
用 cdto 或者 go2shell

论坛徽章:
5
丑牛
日期:2014-01-21 08:26:26卯兔
日期:2014-03-11 06:37:43天秤座
日期:2014-03-25 08:52:52寅虎
日期:2014-04-19 11:39:48午马
日期:2014-08-06 03:56:58
10 [报告]
发表于 2012-04-10 12:23 |只看该作者
省事多了
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP