Tengo activada la configuración "abrir carpetas en pestañas nuevas" (en lugar de ventanas nuevas) en el buscador, 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 abren carpetas en pequeñas ventanas del buscador. ¿Cómo puedo hacer que las carpetas abiertas desde aplicaciones externas aparezcan todas en una ventana del buscador con pestañas?
Editar: Bmike en el comentario tiene razón en que esto probablemente podría hacerse a través de un applescript. Algo como esto:
Hice esto, no estoy seguro de si lo responderá por ti.
Preferencias del Finder> General> marque "abrir carpetas en pestañas en lugar de nuevas ventanas"
Gracias por la idea. Tengo el applescript terminado.
Ponga 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 la terminal, escriba
oft .
para abrir la carpeta actual en la nueva pestaña del Finder.
El script bash se usa para recuperar la ruta absoluta, lo que me resultó difícil en appplescript.
ACTUALIZAR
He hecho una versión más extensa (y complicada) que abrirá la misma pestaña para la misma carpeta. Consiguelo aqui
iCode
Mella
Rajiv
bmike
usuario19358
usuario19358