Command reference
ed machines snippets ls
Lists the saved commands a machine offers: the ones saved against it, plus every
shared one. list is an accepted alias, and ls is the group's default, so
ed machines snippets <machine> runs it. The group itself answers to snippet
as well as snippets.
ed machines snippets ls <machine> [--json]Arguments
| Name | Type / values | Default | What it does |
|---|---|---|---|
<machine> |
string, required | none | Machine name, ssh alias, id or unambiguous prefix. |
Options
| Name | Type / values | Default | What it does |
|---|---|---|---|
--json |
flag | off | Emit JSON on stdout instead of the table. |
--help, -h |
flag | off | Print the help for this command on stdout and exit 0. |
Snippets are numbered from 1 in the order they were saved. Nothing is sorted, and shared snippets sit in the same numbering as this machine's own:
$ ed machines snippets ls devbox# TITLE SCOPE COMMAND1 logs machine journalctl -xe --no-pagerA machine with none prints Devbox has no snippets on stderr and exits 0.
--json shape
[ { "command": "journalctl -xe --no-pager", "id": "F8D5CE93-C9B4-4A05-9109-9AEB1BD806BA", "index": 1, "sharedAcrossMachines": false, "title": "logs" }]sharedAcrossMachines is true for a snippet with no machine of its own, which
is the shared value in the SCOPE column.
Examples
ed machines snippets ls devboxed machines snippets devboxed machines snippets ls devbox --json | jq -r '.[] | select(.sharedAcrossMachines) | .title'Behaviour notes
Read only, straight out of snippets.json, with no connection opened. Run an
entry by its displayed number with ed machines snippets run <machine> <index>.
Where to go next
ed machines, the rest of this group- All
edcommands