Created
June 3, 2009 01:25
-
-
Save jrk/122722 to your computer and use it in GitHub Desktop.
Shell aliases for quickly acting on the frontmost Finder window.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Define front_finder_window_path to return the POSIX path string to the frontmost Finder window | |
| alias front_finder_window_path="osascript -e 'tell application \"Finder\" to get URL of target of front Finder window' | sed 's/file:\\/\\/localhost//g'" | |
| # cd to the front Finder window path | |
| alias cdf='cd `front_finder_window_path`' | |
| # pushd to the front Finder window path | |
| alias pushdf='pushd `front_finder_window_path`' | |
| alias pushf=pushdf | |
| alias pdf=pushdf | |
| # Open the front Finder window path in TextMate | |
| alias matef='mate `front_finder_window_path`' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment