是否有类似于“在这里打开命令窗口”的Mac OS Windows Powertoy ?我通过谷歌搜索找到了几个插件,但想看看哪些最适合开发人员。


当前回答

此外,您可以使用command-C从查找器中复制一个项目,跳转到终端(例如使用Spotlight或QuickSilver)键入'cd '并简单地使用command-v粘贴

其他回答

这比你要求的要多一点,但我推荐Cocoatech的Path Finder给那些希望Finder有更多果汁的人。它包括一个工具栏按钮,用于打开当前目录的终端窗口,或者在每个Finder窗口的底部有一个带有终端命令行的可伸缩窗格。还有许多我现在生活中不可或缺的功能。非常成熟、稳定的软件。 http://cocoatech.com/

这样的:

https://github.com/jbtule/cdto#cd-to

这是一个小的应用程序,你可以拖到Finder工具栏中,图标非常合适。它使用Terminal, xterm(在X11下),term。

如果你安装了Big Cat Scripts (http://www.ranchero.com/bigcat/),你可以添加自己的上下文菜单(右键单击)项。我不认为它带有一个Open Terminal Here applescript,但我使用这个脚本(我不记得是我自己写的,还是从别人的例子中引用的):


on main(filelist)
    tell application "Finder"
        try
            activate
            set frontWin to folder of front window as string
            set frontWinPath to (get POSIX path of frontWin)
            tell application "Terminal"
                activate
                do script with command "cd \"" & frontWinPath & "\""
            end tell
        on error error_message
            beep
            display dialog error_message buttons ¬
                {"OK"} default button 1
        end try
    end tell
end main

类似的脚本还可以通过右键单击获得文件的完整路径,我发现这更有用。

我为finder工具栏创建了一个包含3个应用程序的包。 另外两个应用程序可以做到:

打开当前选择的Textmate 用当前文件夹打开GitX

更多信息请看这里: http://nslog.de/posts/71

在OSX 10.6上的AppleScript中有一个错误。(2终端Windows打开)。 我通过在激活后添加关闭命令来解决这个问题。这将关闭第一个终端窗口。

on run
    tell application "Finder"
        try
            activate
            set frontWin to folder of front window as string
            set frontWinPath to (get POSIX path of frontWin)
            tell application "Terminal"
                activate
                close
                do script with command "cd \"" & frontWinPath & "\""
            end tell
        on error error_message
            beep
            display dialog error_message buttons ¬
                {"OK"} default button 1
        end try
    end tell
end run