# The prompt

> Keys, completion, shell mode, search, attachments, the queue and the external editor in the terminal prompt.

## Keys

| Key | Does |
| - | - |
| `Enter` | Send (or queue, while a run is busy) |
| `Shift`+`Enter` | New line |
| `Ctrl`+`J` | New line, on terminals that do not report Shift+Enter |
| `↑` `↓` | Previous and next prompt from history, at the start or end of the text |
| `?` | Search this conversation, on an empty prompt |
| `!` | Shell mode, on an empty prompt |
| `Ctrl`+`V` | Paste text or an image from the system clipboard |
| `Ctrl`+`G` | Edit the prompt in `$VISUAL` or `$EDITOR` |
| `Ctrl`+`A` | Select all |
| `Backspace` | Remove the last attachment, on an empty prompt |

## Completion

| Type | Lists | Inserts |
| - | - | - |
| `/` | Commands, then skills | The command name |
| `@` | Files and folders in the working directory | The path |
| `#` | Your other chats, then this session's artifacts (pull requests, branches, files) | A short chat id such as `#abc123`, or the artifact's URL or path |

In the popup, `↑` `↓` move, `Enter` or `Tab` picks, `Esc` closes. On `#`, `Tab` switches between chats from this project and from all projects. A chat reference lets the agent read that conversation.

*Terminal: Typing / lists the commands.*

```text
 ┌ New session ─────────── ▢ ─ ~/acme-api  0 user messages  0 turns  ctrl+shift+x session ┐
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                         No messages yet. Type below to start.                          │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 ┌─commands─────────────────────────────────────────────────────────────────────2─matches─┐
 │ ── Commands ────────────────────────────────────────────────────────────────────────── │
 │ ▶ help  List commands                                                                  │
 │   reload  Reload extensions and rerun their setup                                      │
 │ ↑↓ navigate  ↵ select  esc close                                                       │
 └────────────────────────────────────────────────────────────────────────────────────────┘
 ┌──────────────────────── ↵ send  shift+↵ newline  ↑↓ history  ? search  ctrl+s messages ┐
 │ /                                                                                      │
 └────────────────────────────────────────────────────────────────────────────────────────┘
 shift+tab Build  ctrl+m/l Opus 5.5 +1 medium  ctrl+shift+x session  ctrl+o settings
                                                                         ctx 0 / 1.00M (0%)
```

*Terminal: Typing @src/ lists that folder's files.*

```text
 ┌ New session ─────────── ▢ ─ ~/acme-api  0 user messages  0 turns  ctrl+shift+x session ┐
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                         No messages yet. Type below to start.                          │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 ┌─files────────────────────────────────────────────────────────────────────────3─matches─┐
 │ ▶ src/                                                                                 │
 │   limits.ts  src                                                                       │
 │   server.ts  src                                                                       │
 │ ↑↓ navigate  ↵ select  esc close                                                       │
 └────────────────────────────────────────────────────────────────────────────────────────┘
 ┌──────────────────────── ↵ send  shift+↵ newline  ↑↓ history  ? search  ctrl+s messages ┐
 │ Explain @src/                                                                          │
 └────────────────────────────────────────────────────────────────────────────────────────┘
 shift+tab Build  ctrl+m/l Opus 5.5 +1 medium  ctrl+shift+x session  ctrl+o settings
                                                                         ctx 0 / 1.00M (0%)
```

*Terminal: Typing # lists your other chats with their id, age and message count.*

```text
 ┌ New session ──────── ▢ ─ ~/acme-api · 0 user messages · 0 turns · ctrl+shift+x session ┐
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                          no messages yet, type below to start                          │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 │                                                                                        │
 ┌─chats────────────────────────────────────────────────────────────────────────2─matches─┐
 │ ── Chats ───────────────────────────────────────────────────────────────────────────── │
 │ ▶ Test command  #a2859e · just now · 1 msg                                             │
 │   Rate limiting /chat  #57da8e · just now · 2 msgs                                     │
 │ ↑↓ navigate · ↵ select · tab scope · esc close                                         │
 └────────────────────────────────────────────────────────────────────────────────────────┘
 ┌─────────────────────↵─send─·─shift+↵─newline─·─↑↓─history─·─?─search─·─ctrl+s─messages─┐
 │ Follow up on #                                                                         │
 └────────────────────────────────────────────────────────────────────────────────────────┘
 shift+tab Build · ctrl+m/l Opus 5.5 +1 medium · ctrl+shift+x session · ctrl+o settings
```

### Commands

| Command | Description |
| - | - |
| `/help` | List commands. |
| `/reload` | Reload extensions and rerun their setup. Terminal app only. |

Extensions add commands, and you add yours as Markdown files: [extensions](https://zidane.si/docs/extensions.md#commands).

### Pin a skill

`/<skill-name>` pins a skill to the session: the agent gets its instructions on every run, after restarts too. Run it again to unpin. The footer counts pinned skills (`✦ 2 skills`). A skill wins over a command with the same name. How skills load: [skills](https://zidane.si/docs/skills.md).

## Shell mode

`!` on an empty prompt switches to shell mode. Type a command and press `Enter`. `Backspace` at the start of the line leaves it.

- The command runs in your `$SHELL` (or `/bin/sh`), with the terminal's environment, in the session's folder, or on the remote host for a remote session.
- zidane records it as a `shell` call, so the agent sees the command and its output on the next turn.

| Limit | Value |
| - | - |
| Lines shown in the transcript | The last 10. Settings › UI › Full shell output shows all. |
| Output kept for the transcript and the agent | The last 32 KiB |
| Output before zidane stops the command | 1 MiB |

## Search the conversation

`?` on an empty prompt, or `Ctrl`+`S`, searches this conversation's messages. Type to filter, `↑` `↓` to move, `Enter` to open a message, `Esc` to leave. An open message can be forked, edited, copied or deleted: [sessions and forks](https://zidane.si/docs/tui-sessions.md#fork-edit-or-delete-a-message).

## Attachments

| Attachment | When you |
| - | - |
| `paste.txt` | Paste more than 10 lines or 10,000 characters |
| The file | Drop a file onto the terminal (up to 20 MiB, a larger file inserts its path) |
| The image | Press `Ctrl`+`V` with an image copied (up to 3.5 MiB) |

These limits are the terminal app's own. Settings › Agent › Paste attachments off makes pastes and drops insert plain text.

## The queue

With Settings › Composer › Messages during a run on Queuing (the default), a message sent during a run waits above the prompt until the run ends. On Steering, it goes into the run. `Alt`+`Enter` sends one message the other way. Queue and steering in both apps: [queue and steer](https://zidane.si/docs/apps.md#queue-and-steer).

| Key | Does |
| - | - |
| `↑` on an empty prompt | Select the queue |
| `↑` `↓` | Move between queued messages |
| `Ctrl`+`Enter` | Steer: send the selected message into the running turn, between tool calls |
| `Backspace` | Drop it |
| `Esc` | Back to the prompt |

## Inline autocomplete

Settings › Agent › Inline autocomplete (on by default) suggests the rest of a path or command in dim text. `Tab` accepts, `↑` `↓` show other suggestions, `Esc` dismisses.

## External editor

`Ctrl`+`G` opens the prompt in `$VISUAL`, else `$EDITOR`. Save and quit to bring the text back. Settings › Agent › Edit prompt in $EDITOR turns the key off. Composer settings and defaults: [Settings](https://zidane.si/docs/tui-settings.md#composer).
