docs: commit new document

This commit is contained in:
YuKun Liu committed 2022-09-22 00:24:07 -07:00
1 parent 20c29ed042
commit f099042726
3 files changed
+103 -1

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
# Command Functions
> you can use command functions to execute some code & script
Type Define:
```
Stdio: "Inhert" | "Piped" | "Null"
```
### `exec(commands: [string], stdout: Stdio, stderr: Stdio)`
you can use this function to run some command on the current system.
```lua
local cmd = plugin.command
manager.test = function ()
cmd.exec({"git", "clone", "https://github.com/DioxusLabs/cli-plugin-library"})
end
```
> Warning: This function don't have exception catch.