3 ms·
Also, `cd .` to open the current directory in a Finder window. Not mine (found online years ago), but here's the opposite. `cd` into the frontmost Finder windo
by alsetmusic 2y ago
Also, `cd .` to open the current directory in a Finder window.
Not mine (found online years ago), but here's the opposite. `cd` into the frontmost Finder window:
cd "$(osascript -e 'tell app "Finder" to POSIX path of (insertion location as alias)')";
- kps 2y agoYou mean `open .`
- alsetmusic 2y agoYeah, I had just woke up. Drat.
- sneak 2y agoYou can also just drag the proxy icon onto the terminal window for its path, ie “cd “ <drop>, enter.
- kstrauser 2y agoI use that all the time. You can also cmd-c copy a file in Finder then paste into the terminal to get its path.
- alsetmusic 2y agoI genuinely didn't know this. I would have thought I had to do the "copy as pathname" trick with a right-click while holding Option. I already knew the drag and drop feature, so this doesn't really save me time, but it's good to know another nice feature.