Skip to content

Commit

Permalink
docs: add --orphan option to run command and wait_with_output m…
Browse files Browse the repository at this point in the history
…ethod
  • Loading branch information
sxyazi committed Apr 27, 2024
1 parent b21c9f1 commit 82ff8fc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/configuration/keymap.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,9 @@ Run a shell command.
| Argument/Option | Description |
| --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `[run]` | Optional, command template to be run. |
| `--block` | Open in a blocking manner. After setting this, Yazi will hide into a secondary screen and display the program on the main screen until it exits. During this time, it can receive I/O signals, which is useful for interactive programs. |
| `--confirm` | When the template is provided, run it directly, no input UI was shown. |
| `--block` | Open in a blocking manner. After setting this, Yazi will hide into a secondary screen and display the program on the main screen until it exits. During this time, it can receive I/O signals, which is useful for interactive programs. |
| `--orphan` | Keep the process running even if Yazi has exited, once specified, the process will be detached from the task scheduling system. |

You can use the following shell variables in `[run]`:

Expand Down
11 changes: 11 additions & 0 deletions docs/plugins/utils.md
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,17 @@ Wait for the child process to finish, returns `(status, err)`:
- `status` - The [Status](#status) of the child process if successful; otherwise, `nil`
- `err` - The error code if the operation is failed, which is an integer if any

### `wait_with_output()` {#Child.wait_with_output}

```lua
local output, err = child:wait_with_output()
```

Wait for the child process to finish and get the output, returns `(output, err)`:

- `output` - The [Output](#output) of the child process if successful; otherwise, `nil`
- `err` - The error code if the operation is failed, which is an integer if any

### `start_kill()` {#Child.start_kill}

```lua
Expand Down

0 comments on commit 82ff8fc

Please sign in to comment.