Tengo la configuration "abrir carpetas en tabs nuevas" (en lugar de windows nuevas) en el buscador activado pero esto no parece influir en lo que hacen mis otras aplicaciones cuando abren una carpeta. Launchbar y un script de shell que ejecuto desde emacs aún abre carpetas en pequeñas windows de búsqueda. ¿Cómo puedo hacer que las carpetas abiertas desde aplicaciones externas aparezcan en una window con tabs?
Editar: Bmike en el comentario es correcto que esto probablemente podría hacerse a través de un AppleScript. Algo como esto:
Gracias por la idea Tengo el AppleScript terminado.
Coloque lo siguiente en su ~/.bashrc
o ~/.zshrc
# open the current folder in Finder's tab function oft() { # if no arguments are given, we use the current folder oft_absolute_path=$(cd ${1:-.}; pwd) # execute the applescirpt osascript 2>/dev/null <<EOF # Finder returns a path with trailing slash # But PWD doesn't have one, so we add one for it set new_tab_path to "$oft_absolute_path" & "/" tell application "Finder" activate if not (exists window 1) then make new Finder window end if try set finder_path to POSIX path of (target of window 1 as alias) on error # the finder's window doesn't contain any folders set target of front window to (new_tab_path as POSIX file) return end try end tell if new_tab_path = finder_path then # the finder's tab is already there return end if # open new tab in Finder tell application "System Events" to keystroke "t" using command down # set the Finder's path tell application "Finder" set target of front window to (new_tab_path as POSIX file) end tell return EOF # clear the tempory veriable unset oft_absolute_path }
En terminal, escriba
oft .
para abrir la carpeta actual en la nueva pestaña del Finder.
La secuencia de commands bash se usa para recuperar la ruta absoluta, lo cual me resultó difícil de hacer en una aplicación de text.
ACTUALIZAR
He creado una versión más extensa (y complicada) que abrirá la misma pestaña para la misma carpeta. Consiguelo aqui
Hice esto, no estoy seguro de si te responderá por ti.
Preferences de Finder> General> marca "abrir carpetas en tabs en lugar de windows nuevas"