Goal: Right-click in Finder and have an option to “Open Terminal at Finder location”
Possible solution: Quick Action
I ran Linux for about 18 years and I loved having a right-click item in the file browser that would open a terminal at the file browser location. I noticed that Finder on a Mac doesn’t have such an option. I know I can open Terminal on a Mac and then “cd” to the desired location, but I was hoping to be able to open Finder and then right-click in a Finder window and have an option to open Terminal in that location. Is there a way to implement this? Perhaps an Automator Quick Action?
—–
Ian MacGregor
Actually, there is already a keyboard shortcut built in to macOS, you just need to activate it.
Go to System Preferences, Keyboard, Shortcuts. Then click on Services on the left. Look under File and Folders for New Terminal at Folder. Check it if it isn't already. Then assign a keyboard shortcut.
The problem with this is you have to have the folder selected for it to work. It won't work on the "current" folder. So you have to go up a level and select the folder first.
There is a free app in the Mac App Store that should do it though. Look at https://apps.apple.com/us/app/go2shell/id445770608
I just learned something new. If you open Finder and go to Finder > Services in the menu bar, there is very little there. But if you open Finder, select a folder and then click Finder > Services, more options appear. So, it seems that assigning a keyboard shortcut isn't required in order to see this new option so long as the option is enabled in Keyboard Shortcuts. But having a keyboard shortcut is sometimes easier. Thank you, Gary!
Well, it seems that I keep learning new things from Gary. After watching Gary's video entitled "The 4 Mac Techniques You Need to Master", I tried control clicking a folder in Finder. Guess what's at the bottom of the context menu? Yep.. "New Terminal Tab at Folder". This also seems to be default in Catalina as I haven't toggled any Keyboard Shortcuts yet. Thanks again, Gary!
Ian: Yes, the Service should be enabled by default. I would still like it if you could do it for the current folder and not have to move up a level first though.
Gary: That would be ideal. We just need a way for Finder to pass the current folder location to Terminal and then we could use a shell script in a Quick Action. I used to know how to do this in Nautilus years ago but I forget the argument.. it was a $ something. Alternatively, you can type "open ." (open+space+period) in Terminal to open Finder with the current working directory, but we want the reverse of that.