Command reference
ed clipboard copy
Puts one entry back on the pasteboard, the same as clicking it in the panel.
ed clipboard copy <index> [--plain] [--type <type>] [--json]| Name | Type / values | Default | What it does |
|---|---|---|---|
<index> |
integer, from 1 | required | The entry number, counting from 1. |
--plain |
flag | off | Copy as plain text even when the entry is styled. |
--type |
type identifier or number | none | Copy only this representation, by type identifier or by its number. |
--json |
flag | off | Emit JSON on stdout. |
--json is the entry object exactly as ls emits it, with no extra keys. It
reports the entry as it was before the copy, so copiedAt is the previous copy
time rather than this one.
The whole pasteboard is replaced: clearContents first, then the entry's own
type. Rich text and HTML are written twice, once in their own type and once as a
plain string, so an app that only understands text still gets something. A
copied file goes back as a file URL, and a list of files goes back as a list of
them, which is why pasting one into Finder works; a copied web link goes back as
both a URL and a string. --plain only bites on a text, rich text or HTML
entry; on an image or a file it is quietly ignored and the real type is written.
Two side effects come with it. The entry's lastCopiedAt is bumped, so it moves
to the top of the list and everything that was above it shifts down by one. And
the pasteboard is stamped with a private Edith marker,
which is how the app's watcher knows this came from Edith and does not file it
as a fresh entry.
--type copies one representation that
ed clipboard inspect lists, by its type identifier or number,
and leaves the others off the pasteboard. While the entry is still the current
pasteboard every listed type can be copied; afterwards only the saved copy can.
--type cannot be combined with --plain. With --json the entry object gains
a representation key describing the copied type.
Examples:
ed clipboard copy 1ed clipboard copy 4 --plained clipboard copy 2 --jsoned clipboard copy 1 --type public.html$ ed clipboard copy 4copied entry 4An entry whose blob has gone missing under the index exits 3 with the stored copy of that entry is gone, and nothing reaches the pasteboard.
Where to go next
ed clipboard, the rest of this group- All
edcommands