1 From Terminal to Finder
To open Terminal's current directory in Finder, useopen .. The open command is versatile --- you can use it to open other directories, files, or launch applications.
2 From Finder to Terminal
Here, we'll register a shortcut key to open Finder directories in Terminal. First, open [System settings > Keyboard > Keyboard Shortcuts > Services].


3 Moving to Finder's Current Directory in Terminal
Here's a useful shell function. When using Terminal, you might want to navigate to the directory currently open in Finder. This can be achieved with thecdf command below. (Quoted from this page.)
If you want to use it, add it to your .zshrc or .bashrc.
# Change working directory to the top-most Finder window location
cdf() {
cd "$(osascript -e 'tell app "Finder" to POSIX path of (insertion location as alias)')";
}Desktop, but after executing cdf, it moved to the Google folder that was open in Finder.

4 From Finder to VScode
You often want to open Finder folders in VScode. It would be convenient to open selected folders with a shortcut key. Here, we'll create such a shortcut using Automator.app's Quick Action. First, open Automator.app and select Quick Action.


