⌘P and dropping files
⌘P file search
Press ⌘P in a terminal pane to search all files of the git repository that pane is in (respecting .gitignore); outside a repository it searches the current directory. Files with uncommitted changes, files under the current directory and recently previewed files rank first. The query syntax is the same as fzf: separate several terms with spaces, anchor with ^ / $, match exactly with ', exclude with !.
| ⏎ | Quick Look preview |
| ⌘⏎ | Pin as a pane on the right |
| ⌥⏎ | Insert the path (escaped by shell rules) into the command line without running it |
Dropping from Finder
Drag a file from Finder onto a pane: when claude / codex is in the foreground, the path is inserted so the Agent can read it as an attachment; for other programs, it opens in a Quick Look preview by default. Hold ⌥ when you let go to get the other behavior. While you drag, the pane shows what will happen when you drop.