aboutsummaryrefslogtreecommitdiffstats
path: root/.functions
diff options
context:
space:
mode:
Diffstat (limited to '.functions')
-rw-r--r--.functions5
1 files changed, 5 insertions, 0 deletions
diff --git a/.functions b/.functions
index 90373ae..001e3d9 100644
--- a/.functions
+++ b/.functions
@@ -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