Thu Jul 05, 2007 · 108 words

Errr, this is about as basic as it gets, but:

tell application "Finder"
	set currDir to quoted form of POSIX path of (target of window 1 as alias)
	set theCommand to text returned of (display dialog "" default answer "ls")
	set out to do shell script "cd " & currDir & ";" & theCommand
	if (out is not "") then
		display alert out
	end if
on error e
	display alert e buttons "Bummer"
end try
end tell

Save that to the right place, give it a shortcut and now I can run shell commands into the frontmost Finder window. Really handy for situations like these:

or, typically:

back · essays · credits ·