aboutsummaryrefslogtreecommitdiff
path: root/docs/next/website/src
diff options
context:
space:
mode:
authorCan Celik <ogulcancelik@gmail.com>2026-09-11 00:55:19 +0300
committerGitHub <noreply@github.com>2026-09-11 00:55:19 +0300
commit58271459401fa461707c042f7f03867ddcfff3ea (patch)
treed8ae601d636858d9fafba62332870144059b2a3b /docs/next/website/src
parent043b804c44665b07bd503fdad896bbe0a29311a0 (diff)
feat: support conditional sidebar token hiding (#3925)
Diffstat (limited to 'docs/next/website/src')
-rw-r--r--docs/next/website/src/content/docs/configuration.mdx2
-rw-r--r--docs/next/website/src/content/docs/ja/configuration.mdx2
-rw-r--r--docs/next/website/src/content/docs/zh-cn/configuration.mdx2
3 files changed, 3 insertions, 3 deletions
diff --git a/docs/next/website/src/content/docs/configuration.mdx b/docs/next/website/src/content/docs/configuration.mdx
index a8050d2b..34b810b5 100644
--- a/docs/next/website/src/content/docs/configuration.mdx
+++ b/docs/next/website/src/content/docs/configuration.mdx
@@ -415,7 +415,7 @@ rows = [
]
```
-The first matching rule wins. Its specified style fields override the occurrence's defaults; unspecified fields inherit them. If no rule matches, the defaults remain. Matching uses the full token value before display truncation and does not change its text, separators, or visibility. A rule with no style fields stops matching and keeps the defaults.
+The first matching rule wins. Its specified style fields override the occurrence's defaults; unspecified fields inherit them. If no rule matches, the defaults remain. Matching uses the full token value before display truncation. Set `hide = true` on a rule to remove the matching token and its separator; rows with no remaining tokens also disappear. For example, `{ token = "machine", fg = "#61afef", rules = [{ equals = "Local", hide = true }] }` hides the machine token when its label is exactly `Local`. This compares the label, not the connection type. With `hide = false` or omitted, the token stays visible. A rule with no overrides still stops matching and keeps the defaults.
`equals`, `contains`, and `starts_with` take strings and are case-sensitive. Add `ignore_case = true` for ASCII case-insensitive matching; non-ASCII characters remain case-sensitive. Empty strings follow ordinary string matching: empty `equals` matches only an empty value, while empty `contains` or `starts_with` matches any present value.
diff --git a/docs/next/website/src/content/docs/ja/configuration.mdx b/docs/next/website/src/content/docs/ja/configuration.mdx
index e4c722ff..7867e8c4 100644
--- a/docs/next/website/src/content/docs/ja/configuration.mdx
+++ b/docs/next/website/src/content/docs/ja/configuration.mdx
@@ -411,7 +411,7 @@ rows = [
]
```
-最初に一致したルールだけを適用します。指定されたスタイルはその出現箇所のデフォルトを上書きし、省略したフィールドは継承します。一致しなければデフォルトを保ちます。判定には表示幅で切り詰める前の値全体を使い、テキスト、区切り、表示の有無は変更しません。スタイルを指定しないルールに一致すると、そこで判定を終了してデフォルトを保ちます。
+最初に一致したルールだけを適用します。指定されたスタイルはその出現箇所のデフォルトを上書きし、省略したフィールドは継承します。一致しなければデフォルトを保ちます。判定には表示幅で切り詰める前の値全体を使います。ルールに `hide = true` を指定すると、一致したトークンとその区切りを非表示にします。残るトークンがない行も非表示になります。たとえば `{ token = "machine", fg = "#61afef", rules = [{ equals = "Local", hide = true }] }` は、ラベルが正確に `Local` の場合にマシントークンを非表示にします。接続の種類ではなくラベルを比較します。`hide = false` または省略時は表示を維持します。上書きを指定しないルールでも、一致するとそこで判定を終了してデフォルトを保ちます。
`equals`、`contains`、`starts_with` は文字列を受け取り、大文字と小文字を区別します。`ignore_case = true` は ASCII だけを区別しなくなり、非 ASCII 文字は引き続き区別します。空文字列の `equals` は空の値だけに一致し、空の `contains` と `starts_with` は存在するすべての値に一致します。
diff --git a/docs/next/website/src/content/docs/zh-cn/configuration.mdx b/docs/next/website/src/content/docs/zh-cn/configuration.mdx
index 0a87b36a..1bb7d541 100644
--- a/docs/next/website/src/content/docs/zh-cn/configuration.mdx
+++ b/docs/next/website/src/content/docs/zh-cn/configuration.mdx
@@ -411,7 +411,7 @@ rows = [
]
```
-只有第一条匹配的规则生效。指定的样式字段覆盖当前位置的默认值,未指定的字段保持继承。没有规则匹配时保留默认样式。匹配使用显示截断前的完整值,不改变文本、分隔符或可见性。没有样式字段的规则一旦匹配,就会停止后续匹配并保留默认样式。
+只有第一条匹配的规则生效。指定的样式字段覆盖当前位置的默认值,未指定的字段保持继承。没有规则匹配时保留默认样式。匹配使用显示截断前的完整值。在规则中设置 `hide = true` 可移除匹配的 token 及其分隔符;没有剩余 token 的行也会消失。例如,`{ token = "machine", fg = "#61afef", rules = [{ equals = "Local", hide = true }] }` 会在机器标签恰好为 `Local` 时隐藏机器 token。它比较的是标签,而不是连接类型。设置 `hide = false` 或省略时,token 保持可见。没有覆盖字段的规则一旦匹配,仍会停止后续匹配并保留默认值。
`equals`、`contains` 和 `starts_with` 接受字符串,默认区分大小写。添加 `ignore_case = true` 可忽略 ASCII 大小写,非 ASCII 字符仍区分大小写。空字符串遵循普通字符串匹配:空的 `equals` 只匹配空值,空的 `contains` 或 `starts_with` 匹配任何已存在的值。