Drag items into a Terminal window on Mac
You can save time by dragging an item into a Terminal window to enter the absolute path of a file or the contents of a text clipping.
In the Terminal app on your Mac, do any of the following:
Enter the path of a file or folder: Drag the file or folder to the Terminal window. The item’s absolute path appears on the command line.
You can also drag a folder from the title bar of a Finder window.
Run an executable file: Drag the file to the Terminal window, then press Return.
Use a snippet of text saved as a clipping: Drag the clipping to the Terminal window.
Dragging a clipping may add the escape equivalent of certain special text characters. If you don’t want to include those characters, hold down the Command key while you drag the clipping.
Change the background colour of a Terminal window: Drag a colour from a colour window or colour well to the Terminal window.