Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Automatically cd to active Finder directory in new Terminal window' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Automatically cd to active Finder directory in new Terminal window
Authored by: googoo on Sep 23, '11 09:59:23AM
I do something similar, except I put in an extra condition in case the selection of the finder window errors. This could occur if there are no finder windows open. My cdf script is

tell application "Finder"
	try
		POSIX path of (target of window 1 as alias)
	on error
		POSIX path of (path to desktop folder as alias)
	end try
end tell
I put this in a file named cdf.scpt (or whatever you like), and added the following line to my .bash_profile file

alias cdf='cd "`osascript path/cdf.scpt`"'
where path id the UNIX path to the location of the cdf.scpt file.

-Mark

[ Reply to This | # ]

Automatically cd to active Finder directory in new Terminal window
Authored by: Lri on Sep 25, '11 10:35:09AM

insertion location also returns the desktop if there are no open windows.



[ Reply to This | # ]