Skip to content

Commit

Permalink
docs: add tabs to the YAZI_LOG environment variable section
Browse files Browse the repository at this point in the history
  • Loading branch information
sxyazi committed Dec 9, 2024
1 parent 93705eb commit 298f17f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
17 changes: 17 additions & 0 deletions docs/plugins/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ sidebar_label: Plugins (BETA)
description: Learn how to extend Yazi with Lua plugins.
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Plugins (BETA)

You can extend Yazi's functionality through Lua plugins, which need to be placed in the `plugins` subdirectory of Yazi's configuration directory, so either:
Expand Down Expand Up @@ -275,10 +278,24 @@ If you want to debug some runtime data, use [`ya.dbg()`](/docs/plugins/utils#ya.

Make sure to set the `YAZI_LOG` environment variable before starting Yazi:

<Tabs>
<TabItem value="unix" label="Unix-like" default>

```sh
YAZI_LOG=debug yazi
```

</TabItem>

<TabItem value="powershell" label="PowerShell">

```powershell
$env:YAZI_LOG = "debug"; yazi
```

</TabItem>
</Tabs>

otherwise, no logs will be recorded. Its value can be (in descending order of verbosity):

- `debug`
Expand Down
8 changes: 4 additions & 4 deletions docs/tips.md
Original file line number Diff line number Diff line change
Expand Up @@ -367,14 +367,14 @@ Add the following code to your `~/.config/yazi/init.lua`:
Status:children_add(function()
local h = cx.active.current.hovered
if h == nil or ya.target_family() ~= "unix" then
return ui.Line {}
return ""
end

return ui.Line {
ui.Span(ya.user_name(h.cha.uid) or tostring(h.cha.uid)):fg("magenta"),
ui.Span(":"),
":",
ui.Span(ya.group_name(h.cha.gid) or tostring(h.cha.gid)):fg("magenta"),
ui.Span(" "),
" ",
}
end, 500, Status.RIGHT)
```
Expand All @@ -388,7 +388,7 @@ Add the following code to your `~/.config/yazi/init.lua`:
```lua
Header:children_add(function()
if ya.target_family() ~= "unix" then
return ui.Line {}
return ""
end
return ui.Span(ya.user_name() .. "@" .. ya.host_name() .. ":"):fg("blue")
end, 500, Header.LEFT)
Expand Down

0 comments on commit 298f17f

Please sign in to comment.