|
|
Create a command to 'cd' to frontmost Finder window
Sa-weeet!
Create a command to 'cd' to frontmost Finder window
If you'd prefer that as the default response, you can easily get that by changing the "false" argument in calls to "CD_to" to "true".
Create a command to 'cd' to frontmost Finder window
One problem with using osascript -e is that it's a tiny bit slow. I know, most people won't notice the speed difference, especially when you see the timing results below. What I use instead is:
and save that as a script in my ~/bin folder. Then, in my .bashrc file, I alias cdf to use the script with:
(That's back-tick, double-quote, and single-quote, from inside to out.) Rather than have the 2>/dev/null code ignore the error message, I prefer to go to the desktop if there's no open Finder window. I tried the original solution, and it ran a little slower (by a mean of 85 ms over 10 trials) than this one. I thought I had noticed a little difference, so that's why I timed it.
This, combined with the TerminalHere contextual menu, satisfies my wish-list. There's another AppleScript floating around that does the opposite of this -- opens the current folder in Finder, but this works just fine for me and it's fast:
|
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.10 seconds |
|