From 40d2c19b4e57753996c352649dd967aa876fa0c5 Mon Sep 17 00:00:00 2001 From: sxyazi Date: Sat, 13 Jan 2024 23:27:20 +0800 Subject: [PATCH] docs: add new `is` property --- docs/configuration/theme.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/configuration/theme.md b/docs/configuration/theme.md index 8197463f..9410fc55 100644 --- a/docs/configuration/theme.md +++ b/docs/configuration/theme.md @@ -167,6 +167,9 @@ rules = [ { mime = "video/*", fg = "yellow" }, { mime = "audio/*", fg = "yellow" }, + # Orphan symbolic links + { name = "*", is = "orphan", fg = "red" }, + # ... # Fallback @@ -180,6 +183,16 @@ Each rule supports complete [Style properties](#Types). There are two special ru - `name = "*"` matches all files. - `name = "*/"` matches all directories. +You can restrict the specific type of files through `is`, noting that it must be used with either `name` or `mime`. It accepts the following values: + +- `block`: Block device +- `exec`: Executable +- `fifo`: FIFO +- `link`: Symbolic link +- `orphan`: Orphan symbolic link +- `sock`: Socket +- `sticky`: File with sticky bit set + ## [icons] Display different icons based on file name rules, noting that the `/` after the name signifies that it must be a directory.