Command reference
ed shelf copy-path
Copy the paths of one or more shelf items to the clipboard.
ed shelf copy-path 1 2 --format shelled shelf copy-path 1 --jsonItem 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:
{ "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.