PDA

View Full Version : How to go to current Terminal location in PF browser


openmacnews
Mar 20, 2006, 07:53 PM
hi,

i'm fairly certain this is "in here", but searching on "finder open" returns just about everything ...

when in shell/terminal, if i type

open /path/to/dir/

the Finder opens a window of that DIR ... of course, then i can Reveal in PF.

how do i set terminal (Finder?) to "open" a DIR into PF?

thx.

bill
Mar 21, 2006, 10:31 AM
If you use this, it'll open your folder of choice in Path Finder:
open -a Path\ Finder <foldername>
Example: open -a Path\ Finder ~/Documents
will open your Documents folder in Path Finder.

If you want to make it a bit easier, you can use this:
alias pfo="open -a Path\ Finder"
Then you can typepfo <foldername>
to open the folder of your choice.

Even easier, add the alias to your profile.

openmacnews
Mar 21, 2006, 10:39 AM
If you use this, it'll open your folder of choice in Path Finder

thx! the alias works nicely ...

jeremydb
Jan 06, 2007, 06:56 AM
It would be great if there were a way to jump to the current Terminal location (the PF terminal window). That is, I open a terminal window, navigate to /path/to/something/, but now I'd like to do some GUI stuff with the files in this directory. Ideally, I could just hit some key command, return focus to a Path Finder browser window and jump to the current location. Have I overlooked a feature or am I making a suggestion?

Thanks
Jeremy

neilio
Jan 06, 2007, 11:31 AM
This is something I've wanted, too -- I'll make sure Steve has a feature request on his list to add some terminal integration (like a "pfopen" command or something similar).

jeremydb
Jan 06, 2007, 12:19 PM
I use zsh, and was able to do the following:

alias pfopen="open -a 'Path Finder' ."

Dunno how this is done in bash or tsh, but probably there's something similar?

now, typing pfopen opens a new Path Finder window at the current location. I wish I could get it to open a new tab instead, but it's better than nothing.

jb

jeremydb
Jan 06, 2007, 12:58 PM
This is even better - opens in the current window:

alias pfopen="osascript -e 'on run argv' -e 'tell application \"Path Finder\" to select item 1 of argv' -e 'end run' \$PWD"

or this:

alias pfopen="osascript -e 'on run argv' -e 'tell application \"Path Finder\"' -e 'select item 1 of argv' -e 'activate' -e 'end tell' -e 'end run' \$PWD"

which brings PF to the front afterward.

me
Jan 06, 2007, 08:06 PM
AWESOME TIP!

thank you.

This should be put in the pathfinder download as a read me!