Can be done with a keyboard shortcut or the Services menu but then it tries to open the Terminal of a selected folder not the current open folder
/s
Then in the path bar you can right click your current folder and open in Terminal (or use Services menu to open in 3rd-party terminals)
Or you can just enable it in Finder menu View -> Show Path Bar.
Right click -> Services -> New Terminal Tab at Folder
(or if you have Iterm: Right click -> Services -> New iTerm Tab/Window here)
Or if you have enabled Finder to show the path bar, right click on a folder in Path Bar (last one is the current open one) -> Open in Terminal
Then again, if you do work in the terminal, why do you navigate to the working directory via the UI Finder?
This right-click terminal complaint comes up all the time here and Reddit. Always thought it was so weird.
But then the other day I wasted an hour of my life digging through Microsoft Teams APIs trying to figure out if I could hack up a way to pipe a file directly to a chat and avoid using Finder.
And then it hit me: after I did the whole cumbersome drag-file-to-chat dance, I wanted to get the terminal path back to the file. and it would be really handy if that was a one or two click thing.
So yeah I guess if you’re forced to use some bullshit software like Teams, that feature makes sense.
I guess the only point I’m making is that it’s possible there is some pathological reason why so many people want an “open in terminal from finder” feature. And maybe they are too embarrassed to explain why because they are employed by shitty companies that give little executive function over their workflow. All they want is a little bit of relief from their sadness, just one right-click shortcut to take the pain away for a brief moment.
Or maybe they’re all just weirdos, who knows.
Thanks this seems like the most straightforward, exactly what I was looking for
> (Optional) Bind the ⌘-k hotkey
You tell me.
Your shell script "cmdk" does not bind the Cmd-K hotkey.
I just commented on the fact that binding that key is optional.
Your script add no value, as you would learn from the fzf docs:
https://junegunn.github.io/fzf/shell-integration/
If I wanted that functionality, I would just bind fzf directly to Cmd-K.
The concrete value-adds of cmdk (what fzf doesn't do out of the box):
1. Smart previews. You have to write the fzf preview command to preview text files, directories, images, PDFs, etc. cmdk gives you this out of the box.
2. Choose the command for you. If you rely on the fzf Ctrl-T shortcut, you have to type the `cd`, the `vim`, the `open`, etc. I find that most of the time the command is predictable based on the filetype, so cmdk allows you to skip this. When cmdk doesn't have a command for the filetype though, I supplement with fzf's Ctrl-T.
3. Be smart about which files you're searching to be performant. E.g. very likely users aren't going to jump to files in the "~/Library/Application Support", or certain system directories under "/", so give users the option to go to the parent directory without crawling the subdirectories.
The concrete value-adds of cmdk (what fzf doesn't do out of the box):
1. Smart previews. You have to write the fzf preview command to preview text files, directories, images, PDFs, etc. cmdk gives you this out of the box (see https://github.com/mieubrisse/cmdk/blob/main/preview.sh ).
2. Choose the command for you. If you rely on the fzf Ctrl-T shortcut, you have to type the `cd`, the `vim`, the `open`, etc. I find that most of the time the command is predictable based on the filetype, so cmdk allows you to skip this (see https://github.com/mieubrisse/cmdk/blob/9d742112dab0475d7420... ). When cmdk doesn't have a command for the filetype though, I supplement with fzf's Ctrl-T.
3. Be smart about which files you're searching to be performant. E.g. very likely users aren't going to jump to files in the "~/Library/Application Support", or certain system directories under "/", so give users the option to go to the parent directory without crawling the subdirectories (see https://github.com/mieubrisse/cmdk/blob/main/list-files.sh ).
01HNNWZ0MV43FF•7mo ago
Nitrous oxide is the glycerine of the racing world
rzzzt•7mo ago
mieubrisse•7mo ago