Skip to content

Commit d486c1c

Browse files
authored
docs: fix order of permissions in agents docs (permissions subsection) (#7041)
1 parent 9197a2a commit d486c1c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/web/src/content/docs/agents.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -426,9 +426,9 @@ mode: subagent
426426
permission:
427427
edit: deny
428428
bash:
429+
"*": ask
429430
"git diff": allow
430431
"git log*": allow
431-
"*": ask
432432
webfetch: deny
433433
---
434434

@@ -470,7 +470,7 @@ This can take a glob pattern.
470470
```
471471

472472
And you can also use the `*` wildcard to manage permissions for all commands.
473-
Where the specific rule can override the `*` wildcard.
473+
Since the last matching rule takes precedence, put the `*` wildcard first and specific rules after.
474474

475475
```json title="opencode.json" {8}
476476
{
@@ -479,8 +479,8 @@ Where the specific rule can override the `*` wildcard.
479479
"build": {
480480
"permission": {
481481
"bash": {
482-
"git status": "allow",
483-
"*": "ask"
482+
"*": "ask",
483+
"git status": "allow"
484484
}
485485
}
486486
}

0 commit comments

Comments
 (0)