File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
packages/web/src/content/docs Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -426,9 +426,9 @@ mode: subagent
426426permission:
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
472472And 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 }
You can’t perform that action at this time.
0 commit comments