Docs: change command to cmd (#3530)

This commit is contained in:
Jordan Baron 2022-02-24 07:37:47 -05:00 committed by GitHub
parent 080755b537
commit cf29e02043
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,11 +38,11 @@
* ### Restricting access to the [[`Command`]] APIs
*
* The `shell` allowlist object has a `scope` field that defines an array of CLIs that can be used.
* Each CLI is a configuration object `{ name: string, command: string, sidecar?: bool, args?: boolean | Arg[] }`.
* Each CLI is a configuration object `{ name: string, cmd: string, sidecar?: bool, args?: boolean | Arg[] }`.
*
* - `name`: the unique identifier of the command, passed to the [[Command.constructor | Command constructor]].
* If it's a sidecar, this must be the value defined on `tauri.conf.json > tauri > bundle > externalBin`.
* - `command`: the program that is executed on this configuration. If it's a sidecar, it must be the same as `name`.
* - `cmd`: the program that is executed on this configuration. If it's a sidecar, it must be the same as `name`.
* - `sidecar`: whether the object configures a sidecar or a system program.
* - `args`: the arguments that can be passed to the program. By default no arguments are allowed.
* - `true` means that any argument list is allowed.
@ -59,7 +59,7 @@
* {
* "scope": {
* "name": "run-git-commit",
* "command": "git",
* "cmd": "git",
* "args": ["commit", "-m", { "validator": "\\S+" }]
* }
* }