diff options
author | Mathias Bynens <mathias@qiwi.be> | 2013-04-16 16:35:38 +0200 |
---|---|---|
committer | Mathias Bynens <mathias@qiwi.be> | 2013-04-16 16:35:38 +0200 |
commit | fa14911e953f0d2c8db43538647c9413cca2d5a3 (patch) | |
tree | cc1a57eaf8b20b7c1192296e199fd1c2b192f495 | |
parent | f0944c7be79888fc7e6c422795631de77c357778 (diff) | |
download | dotfiles-fa14911e953f0d2c8db43538647c9413cca2d5a3.tar.gz dotfiles-fa14911e953f0d2c8db43538647c9413cca2d5a3.tar.bz2 dotfiles-fa14911e953f0d2c8db43538647c9413cca2d5a3.zip |
.functions: Add `cdf`
`cdf` changes the working directory to the top-most Finder window location. Thanks to @sindresorhus and @paulirish!
-rw-r--r-- | .functions | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -21,6 +21,11 @@ function mkd() { mkdir -p "$@" && cd "$@" } +# Change working directory to the top-most Finder window location +function cdf() { # short for `cdfinder` + cd "$(osascript -e 'tell app "Finder" to POSIX path of (insertion location as alias)')" +} + # Determine size of a file or total size of a directory function fs() { if du -b /dev/null > /dev/null 2>&1; then |