Skip to content

Commit 8f1d971

Browse files
committed
docs: sync the doc with nightly changes
Fixes #153
1 parent 9a52857 commit 8f1d971

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

piper.yazi/README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ It accepts a string parameter, which is the shell command to be executed, for ex
1717
```toml
1818
# ~/.config/yazi/yazi.toml
1919
[[plugin.prepend_previewers]]
20-
name = "*"
21-
run = 'piper -- echo "$1"'
20+
url = "*"
21+
run = 'piper -- echo "$1"'
2222
```
2323

2424
This will set `piper` as the previewer for all file types and use `$1` (file path) as the preview content.
@@ -39,8 +39,8 @@ Here are some configuration examples:
3939

4040
```toml
4141
[[plugin.prepend_previewers]]
42-
name = "*.tar*"
43-
run = 'piper --format=url -- tar tf "$1"'
42+
url = "*.tar*"
43+
run = 'piper --format=url -- tar tf "$1"'
4444
```
4545

4646
In this example, `--format=url` tells `piper` to parse the `tar` output as file URLs, so you'll be able to get a list of files with icons.
@@ -49,8 +49,8 @@ In this example, `--format=url` tells `piper` to parse the `tar` output as file
4949

5050
```toml
5151
[[plugin.prepend_previewers]]
52-
name = "*.csv"
53-
run = 'piper -- bat -p --color=always "$1"'
52+
url = "*.csv"
53+
run = 'piper -- bat -p --color=always "$1"'
5454
```
5555

5656
Note that certain distributions might use a different name for `bat`, like Debian and Ubuntu uses `batcat` instead, so please adjust accordingly.
@@ -59,8 +59,8 @@ Note that certain distributions might use a different name for `bat`, like Debia
5959

6060
```toml
6161
[[plugin.prepend_previewers]]
62-
name = "*.md"
63-
run = 'piper -- CLICOLOR_FORCE=1 glow -w=$w -s=dark "$1"'
62+
url = "*.md"
63+
run = 'piper -- CLICOLOR_FORCE=1 glow -w=$w -s=dark "$1"'
6464
```
6565

6666
Note that there's [a bug in Glow v2.0](https://github.com/charmbracelet/glow/issues/440#issuecomment-2307992634) that causes slight color differences between tty and non-tty environments.
@@ -69,8 +69,8 @@ Note that there's [a bug in Glow v2.0](https://github.com/charmbracelet/glow/iss
6969

7070
```toml
7171
[[plugin.prepend_previewers]]
72-
name = "*/"
73-
run = 'piper -- eza -TL=3 --color=always --icons=always --group-directories-first --no-quotes "$1"'
72+
url = "*/"
73+
run = 'piper -- eza -TL=3 --color=always --icons=always --group-directories-first --no-quotes "$1"'
7474
```
7575

7676
### Use [`hexyl`](https://github.com/sharkdp/hexyl) as fallback previewer
@@ -81,8 +81,8 @@ This example uses `hexyl` as a fallback previewer instead of `file`.
8181

8282
```toml
8383
[[plugin.append_previewers]]
84-
name = "*"
85-
run = 'piper -- hexyl --border=none --terminal-width=$w "$1"'
84+
url = "*"
85+
run = 'piper -- hexyl --border=none --terminal-width=$w "$1"'
8686
```
8787

8888
## License

0 commit comments

Comments
 (0)