feat: change commands to accept args
This commit is contained in:
@@ -74,16 +74,18 @@ local M = {
|
||||
|
||||
```yaml
|
||||
commands:
|
||||
- command: "list"
|
||||
dir: "some/directory"
|
||||
- command: "ls"
|
||||
args: ["-l", "path/to/directory"]
|
||||
|
||||
- command: "grep"
|
||||
pattern: "searchString"
|
||||
target: "path/to/file/or/directory"
|
||||
args: ["-r", "searchString", "path/to/file/or/directory"]
|
||||
```
|
||||
|
||||
The "ls" command uses the system's 'ls' command to list directory contents.
|
||||
When these commands are present and enable_debug_commands is true, I'll execute them and return the results in the clipboard.
|
||||
The "ls" command uses the system's 'ls' command to list directory contents. You can pass flags or additional arguments in `args`.
|
||||
The "grep" command searches for a given pattern in files or directories, again receiving flags or additional arguments in `args`.
|
||||
If you omit `args` for grep, you can still use the older format with `pattern` and `target` for backward compatibility.
|
||||
|
||||
When these commands are present and `enable_debug_commands` is true, I'll execute them and return the results in the clipboard.
|
||||
]]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user