3 ms·
I achieved something similar in bash, in a terminal-agnostic way a while back. I have this script saved at ~/cdf.scpt : https://gist.github.com/2037421 https://
by mistercow 15y ago
I achieved something similar in bash, in a terminal-agnostic way a while back. I have this script saved at ~/cdf.scpt : https://gist.github.com/2037421 https://gist.github.com/2037421
Then my .bash_profile contains the line:
alias cdf='cd "`osascript ~/cdf.scpt`"'
Now if I type "cdf" in a terminal window, it will automatically cd to the directory of the front-most Finder window.