How to give a terminal a file path instead of the file
A terminal does not want your file. It wants to know where the file is. When you are typing a command and you need to point it at something on disk, what you actually need is the path: a line of text like /Users/you/Downloads/report.pdf sitting on the command line, ready for the command in front of it.
Why the file and the path are not the same thing
Most apps take the file itself. Drop an image on a chat window and it uploads the bytes. Drop a document on an email and it attaches the whole thing. A terminal is different. A shell command such as cat, open, mv, or a script you are running does not receive files. It receives text, and part of that text is usually a path telling it which file to act on.
So when you have a file in Finder and a command half-typed in the terminal, there is a translation to do. You need the file’s location as a string, correctly spelled, with any spaces or odd characters handled so the shell does not choke. Type it by hand and you will get a directory name wrong, or forget that the folder has a space in it, or transpose two letters and spend a minute wondering why the file cannot be found.
The ways people get the path today
macOS gives you a few honest routes, and they all work.
The most common one is to drag the file from Finder straight into the terminal window. The shell inserts the file’s full path as text at the cursor, with spaces escaped. This is genuinely handy, and if the file is visible and the terminal is open beside it, it is often the quickest way to get an accurate path onto the command line.
A second route is to select the file in Finder and copy its path. Holding Option while you right-click gives a Copy as Pathname option, and you can then paste the path wherever the cursor is. This avoids any dragging at all, which helps when the terminal is behind other windows.
A third route is to lean on the shell itself. Type the start of the path and press Tab, and completion fills in the rest a piece at a time. This is precise once you are already close, though it does not help much when the file is somewhere you have not navigated to yet.
Each of these has the same soft spot. The file and the terminal have to come together somehow, either both on screen for a drag, or a copy step followed by a switch back to the terminal. When you are collecting a path from a folder you have to open first, or you want to line up two or three files for one command, the setup starts to outweigh the typing you were trying to avoid.
Hand the path over from a shelf
There is a way to make the file wait until the terminal is ready. Ledge turns the notch at the top of a MacBook into a shelf. You drag a file up toward the notch and let go, and it lands on a shelf that drops down and stays there. Now the file is held, and you can go do whatever you need in the terminal: bring the window forward, change directories, finish typing the command, get the cursor exactly where the path should land. The file is waiting on the shelf until you want it.
When you drag the file off the shelf and drop it onto the terminal, it hands over the path as text, because that is what a terminal can use. Drop the same item onto a Finder window and it moves the file instead. Drop it onto a chat app and it uploads the file. You are throwing one thing at different destinations, and each one receives the version it understands, so the terminal gets a path while the chat window gets an upload, with no thinking about formats on your side.
The first time Ledge types a path into a terminal for you, macOS asks for Accessibility permission, because pasting into another app on your behalf goes through that system. It is asked only when the feature is first needed, never at launch, and the ordinary global shortcut needs no special permission at all.
Collecting a few paths for one command
Paths tend to come in groups. You might want to run one command over three files that live in three different folders. Typed by hand, that is three careful strings on one line, each a chance to make a typo. Dragged one at a time from Finder, it is three trips with three window arrangements.
With a shelf, you gather them first. Drag each file up to the notch as you find it, from wherever it lives. When all three are sitting on the shelf, get your command ready in the terminal, then drop them onto the command line together. Each one lands as its path, spaced out as separate arguments, and the command runs against all of them. The collecting happens at your pace, and the terminal only sees the finished list of paths.
When to just drag from Finder
If the file is already visible and the terminal is open right next to it, dragging straight from Finder into the window is fast and correct, and there is no reason to route it through anything. The same goes for a single Copy as Pathname when the terminal is one click away.
Reach for a shelf when the file lives somewhere you have to go open, when you want to assemble several paths for one command, or when you would rather grab the file now and get to the terminal in a moment. The goal is the same throughout: get a clean, correct path onto the command line without holding a file in mid-air while you hunt for the right window.