# ed machines files undo

> Undoes the last move or rename made in an open Files pane for that machine.

- Canonical URL: https://getedith.pro/docs/cli/machines-files/undo
- Updated: 2026-12-02

Undoes the last move or rename made in an open Files pane for that machine.

```
ed machines files undo <machine> [--json]
```

| Name | Type / values | Default | What it does |
| --- | --- | --- | --- |
| `machine` | machine name, SSH alias, id or unambiguous prefix | required | Whose Files pane to ask. |
| `--json` | flag | off | Emit JSON on stdout. |

```json
{
  "machine": "Devbox",
  "undone": true,
  "what": "Undo Rename"
}
```

```
ed machines files undo devbox
ed machines files undo devbox --json
```

This is the only verb in the group that does not touch SSH. The machine name is
resolved against Edith's own machine list, and everything after that happens
over the app's notification bus: `ed` posts a request carrying the machine's id,
then waits up to 20 seconds for the answer, printing `waiting for Edith to
answer...` on stderr once a second has passed.

**What is undoable.** Exactly two operations, and only when a Files pane
performed them and they succeeded: a rename committed in the pane, and a move
within the machine, which is a drag onto a folder or a cut and paste. The step
is labelled `Rename` or `Move` accordingly.

**What is not.** Copies, duplicates, new folders, trashes, deletes, uploads,
downloads and transfers between machines are never recorded. Neither is anything
`ed` itself did: `ed machines files mv` and `ed machines files rename` do not
join the history, so reverse those with another `mv` or `rename`, which is the
same command the pane would have run.

**How far back.** Each pane keeps its last 20 steps and drops the oldest beyond
that. One invocation pops one step, the most recent, so walk backwards by
running the command again.

**For how long.** As long as the pane is there. The stack lives in memory and is
never written to disk, so closing the pane, pointing it at another screen,
closing the workspace tab or quitting Edith all discard it. Nothing expires on a
timer, and nothing survives a relaunch.

**Which window.** Only a Files pane inside Edith's main window registers itself
as undoable. A standalone Finder window, the kind the Files button on a machine
opens, keeps a private stack that its own Command-Z drives and that `ed` cannot
reach. When several panes are open for one machine, `ed` gets whichever of them
has something on its stack, not necessarily the frontmost.

The reversal replays the step's moves backwards using the same guarded rename
`ed machines files rename` uses, so an undo whose original name has been taken
in the meantime stops rather than overwriting, and it stops at the first move
that fails.

When no open Files window for that machine has anything to undo, the command
exits 4. A name that matches no machine exits 3 first:

```
$ ed machines files undo devbox
error: no Finder window for Devbox has anything to undo
hint: open one with the Files tab, or reverse it with `ed machines files mv`
```

On success the human line is `undid <label> on <machine>`. The label is the
pane's own menu title, which already starts with the word Undo, so the line
reads a little oddly and the JSON does too:

```
$ ed machines files undo devbox
undid Undo Rename on Devbox
```

The only values `what` takes are `Undo Rename`, `Undo Move` and, if the pane has
no title to give, `the last change`.

## Where to go next

- [`ed machines files`](https://getedith.pro/docs/cli/machines-files), the rest of this group
- [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
