# ed shelf copy-path

> Copy the paths of one or more shelf items to the clipboard.

- Canonical URL: https://getedith.pro/docs/cli/shelf/copy-path
- Updated: 2026-12-02

Copy the paths of one or more shelf items to the clipboard.

```sh
ed shelf copy-path 1 2 --format shell
ed shelf copy-path 1 --json
```

Item numbers follow `ed shelf ls`, newest first. Repeated numbers are copied
once, in the order supplied. At least one item number is required.

`--format` accepts `absolute` (the default), `shell`, `filename`, `directory`,
or `url`. Shell format produces single-quoted POSIX shell arguments separated
by spaces, including escaped apostrophes. Other formats use one line per item.
File URLs percent-encode spaces and other special characters.

The path is where the copy is parked on the Shelf, the same file you drag out
of the tray and the same path `ed shelf path` prints. The Shelf does not
record where a file came from, so there is no original path to copy.

Every selected file must still exist. Missing files, invalid selections, and
unknown formats fail before the clipboard changes, with exit 2 for an unknown
format and exit 4 for a missing file. The action does not modify the files or
the shelf index.

Without `--json`, stdout contains the copied text and a trailing newline.
With `--json`, stdout contains:

```json
{
  "copied": true,
  "format": "filename",
  "paths": ["report.pdf", "notes.txt"],
  "text": "report.pdf\nnotes.txt"
}
```

In the notch tray, right-click a file and choose a format from **Copy Path**.

## Where to go next

- [`ed shelf`](https://getedith.pro/docs/cli/shelf)
- [`ed shelf path`](https://getedith.pro/docs/cli/shelf/path)
- [All `ed` commands](https://getedith.pro/docs/cli)

## Get Edith

Edith is a native Mac app for macOS 14 or later on Apple silicon with 100+ extensions, the `ed` command line and an MCP server. $35 once for one Mac, plus $7 for each additional Mac, with no subscription and a 30-day refund.

- [Buy Edith](https://getedith.pro/pricing): $35 once for one Mac, plus $7 for each additional Mac
- [Download Edith](https://getedith.pro/download): the installer, or Homebrew
