From 7ca66b4103d76038a5d21c9b83766967f5028116 Mon Sep 17 00:00:00 2001 From: sxyazi Date: Wed, 24 Dec 2025 17:49:52 +0800 Subject: [PATCH] docs: add an example of previewing the schema of a SQLite database Credits to @AminurAlam - I got this idea from their plugin https://github.com/AminurAlam/yazi-plugins/tree/main/preview-sqlite.yazi, which is pretty convenient to work on these database files! --- piper.yazi/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/piper.yazi/README.md b/piper.yazi/README.md index b015925..3bebcf2 100644 --- a/piper.yazi/README.md +++ b/piper.yazi/README.md @@ -73,6 +73,14 @@ url = "*/" run = 'piper -- eza -TL=3 --color=always --icons=always --group-directories-first --no-quotes "$1"' ``` +### Preview the schema of a SQLite database + +```toml +[[plugin.prepend_previewers]] +mime = "application/sqlite3" +run = 'piper -- sqlite3 "$1" ".schema --indent"' +``` + ### Use [`hexyl`](https://github.com/sharkdp/hexyl) as fallback previewer Yazi defaults to using [`file -bL "$1"`](https://github.com/sxyazi/yazi/blob/main/yazi-plugin/preset/plugins/file.lua) if there's no matched previewer.