Skip to content

Commit

Permalink
.functions: Add cdf
Browse files Browse the repository at this point in the history
`cdf` changes the working directory to the top-most Finder window location. Thanks to @sindresorhus and @paulirish!
  • Loading branch information
mathiasbynens committed Apr 16, 2013
1 parent f0944c7 commit fa14911
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .functions
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fa14911

Please sign in to comment.