Hacker News new | past | comments | ask | show | jobs | submit login

This is not mine. I can’t remember where I found it. Apologies for no attribution (Mac):

#!/usr/bin/env bash

function cdf() { #: Change working directory to the top-most Finder window location cd "$(osascript -e 'tell app "Finder" to POSIX path of (insertion location as alias)')"; }




Ooh, that's nice. I have the opposite direction:

  # Open current working directory in Finder
  alias of='open -a Finder ./'


Wouldn't "open ." work just the same?


I have the same, but mapped to ‘F’. Thank you to whoever submitted that to macosxhints.com many years ago.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: