docs: update opener rules to the new format (#66)

This commit is contained in:
三咲雅 · Misaki Masa 2023-08-16 17:01:51 +08:00 committed by GitHub
parent 639b8425d9
commit d3a0d56ce6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,10 +37,10 @@ Configure available openers, for example:
```toml ```toml
[opener] [opener]
archive = [ archive = [
{ exec = "unar $1" }, { exec = 'unar "$1"' },
] ]
text = [ text = [
{ exec = "nvim $*", block = true }, { exec = 'nvim "$@"', block = true },
] ]
# ... # ...
``` ```
@ -48,8 +48,8 @@ text = [
Available parameters are as follows: Available parameters are as follows:
- exec: The command to open the selected files, with the following variables available: - exec: The command to open the selected files, with the following variables available:
- `$n`: The N-th selected file - `$n`: The N-th selected file, starting from 1
- `$*`: All selected files - `$@`: All selected files
- `foo`: Literal string to be passed - `foo`: Literal string to be passed
- 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. - 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.