docs: edit commands

This commit is contained in:
Jay V 2025-08-26 14:03:56 -04:00
parent f4b69df7a3
commit 11de2e59f3
3 changed files with 218 additions and 70 deletions

View file

@ -25,6 +25,12 @@ Once you're in the TUI, you can prompt it with a message.
Give me a quick summary of the codebase.
```
---
## File references
You can reference files in your messages using `@`. This does a fuzzy file search in the current working directory.
:::tip
You can also use `@` to reference files in your messages.
:::
@ -33,6 +39,20 @@ You can also use `@` to reference files in your messages.
How is auth handled in @packages/functions/src/api/index.ts?
```
The content of the file is added to the conversation automatically.
---
## Bash commands
Start a message with `!` to run a shell command.
```bash frame="none"
!ls -la
```
The output of the command is added to the conversation as a tool result.
---
## Commands
@ -235,18 +255,6 @@ Unshare current session. [Learn more](/docs/share#un-sharing).
---
## Bash commands
Start a message with `!` to run a shell command.
```bash frame="none"
!ls -la
```
The output of the command is added to the conversation as a tool result.
---
## Editor setup
Both the `/editor` and `/export` commands use the editor specified in your `EDITOR` environment variable.
@ -300,6 +308,8 @@ Popular editor options include:
- `notepad` - Windows Notepad
- `subl` - Sublime Text
:::tip
Some editors need command-line arguments to run in blocking mode. The --wait flag makes the editor process block until closed, which is necessary for opencode to function correctly.
:::note
Some editors like VS Code need to be started with the `--wait` flag.
:::
Some editors need command-line arguments to run in blocking mode. The `--wait` flag makes the editor process block until closed.