使用“打开”时,打开新的Finder标签。在航站楼


9

在终端中,我使用open .Finder打开当前目录。

Open folders in new tabs设置是在Finder中设置的,但每次都会打开一个新窗口。在项目/每天结束时,我已经打开了许多此类窗口。

open .在终端中使用时,如何使Finder打开一个新标签页而不是一个新窗口?


我认为open暂时无法解决。
Matthieu Riegler


1
也许,某些AppleScript黑客攻击可以解决此问题。(抱歉,我没有Mavericks进行测试,但是您可以在此处尝试调整解决方案)。
Igor Hatarist 2014年

...并破解您的外壳以替换默认的“ open”。此applescript启动的行为。
Igor Hatarist 2014年

Answers:


2

open .尽管可以使用AppleScript打开新选项卡,但是您不能使用Finder在新选项卡中打开-从如何在新选项卡中复制当前打开的Finder视图(小牛)?

tell application "Finder"
    activate
    set t to target of Finder window 1
    set toolbar visible of window 1 to true
end tell
tell application "System Events"
    keystroke "t" using command down
end tell
tell application "Finder"
    set target of Finder window 1 to t
end tell

或者从http://macscripter.net/viewtopic.php?id=41624

set docs_path to (path to documents folder) as string
set Sat_folder to docs_path & "Sat:"
set ABC_folder to (Sat_folder & "ABC:") as alias

tell application "Finder"
   activate
   open Sat_folder
end tell

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

tell application "Finder"
   set target of front window to ABC_folder
end tell
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.