mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-01 22:10:23 +00:00
docs(permissions): add wildcard example (#1494)
This commit is contained in:
parent
a0d2e53bde
commit
52f9b37576
1 changed files with 16 additions and 0 deletions
|
|
@ -72,3 +72,19 @@ For example.
|
|||
}
|
||||
}
|
||||
```
|
||||
|
||||
- **Use wildcard patterns to restrict specific commands**
|
||||
|
||||
```json title="opencode.json"
|
||||
{
|
||||
"$schema": "https://opencode.ai/config.json",
|
||||
"permission": {
|
||||
"bash": {
|
||||
"git push": "ask",
|
||||
"*": "allow"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
This configuration allows all commands by default (`"*": "allow"`) but requires approval for `git push` commands.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue