From 3cfed5aa6f1065a7bfbaebe82f3ba13eb731e540 Mon Sep 17 00:00:00 2001 From: Arijit Basu Date: Mon, 16 May 2022 17:24:32 +0530 Subject: [PATCH] Improve docs --- .../en/src/environment-variables-and-pipes.md | 3 +- docs/en/src/installing-plugins.md | 3 +- docs/en/src/layout.md | 66 ++++--- docs/en/src/message.md | 12 +- docs/en/src/messages.md | 186 +++++++++--------- docs/script/generate.py | 9 +- src/msg/in_/external.rs | 186 +++++++++--------- 7 files changed, 244 insertions(+), 221 deletions(-) diff --git a/docs/en/src/environment-variables-and-pipes.md b/docs/en/src/environment-variables-and-pipes.md index fa52f6a..26844f8 100644 --- a/docs/en/src/environment-variables-and-pipes.md +++ b/docs/en/src/environment-variables-and-pipes.md @@ -42,6 +42,7 @@ The environment variables starting with `XPLR_PIPE_` are the temporary files called ["pipe"s][18]. The other variables are single-line variables containing simple information: + - [XPLR_APP_VERSION][30] - [XPLR_FOCUS_INDEX][31] - [XPLR_FOCUS_PATH][32] @@ -91,7 +92,7 @@ Currently there is only one input pipe. #### Output pipes `XPLR_PIPE_*_OUT` are the output pipes that contain data which cannot be -exposed directly via environment variables, like multi-line strings. +exposed directly via environment variables, like multi-line strings. These pipes can be accessed as plaintext files located in $XPLR_SESSION_PATH. - [XPLR_PIPE_SELECTION_OUT][21] diff --git a/docs/en/src/installing-plugins.md b/docs/en/src/installing-plugins.md index 9e9916c..7b05de4 100644 --- a/docs/en/src/installing-plugins.md +++ b/docs/en/src/installing-plugins.md @@ -48,7 +48,8 @@ Setup luarocks with the following steps: package.path = os.getenv("LUA_PATH") .. ";" .. package.path package.cpath = os.getenv("LUA_CPATH") .. ";" .. package.cpath ``` -Now you can install packages using luarocks. Be sure to append `--lua-version`. + + Now you can install packages using luarocks. Be sure to append `--lua-version`. Example: diff --git a/docs/en/src/layout.md b/docs/en/src/layout.md index 3c5cbb7..a91862c 100644 --- a/docs/en/src/layout.md +++ b/docs/en/src/layout.md @@ -26,20 +26,22 @@ xplr.config.layouts.builtin.default = { A layout can be one of the following: -- ["Nothing"][8] -- ["Table"][9] -- ["InputAndLogs"][10] -- ["Selection"][11] -- ["HelpMenu"][12] -- ["SortAndFilter"][13] -- { [CustomContent][25] = { [title][33], [body][34] } -- { [Horizontal][14] = { [config][15], [splits][17] } -- { [Vertical][16] = { [config][15], [splits][17] } +- [Nothing][8] +- [Table][9] +- [InputAndLogs][10] +- [Selection][11] +- [HelpMenu][12] +- [SortAndFilter][13] +- [CustomContent][25] +- [Horizontal][14] +- [Vertical][16] ### Nothing This layout contains a blank panel. +Example: "Nothing" + ### Table This layout contains the table displaying the files and directories in the @@ -49,20 +51,38 @@ current directory. This layout contains the panel displaying the input prompt and logs. +Example: "InputAndLogs" + ### Selection This layout contains the panel displaying the selected paths. +Example: "Selection" + ### HelpMenu This layout contains the panel displaying the help menu for the current mode in real-time. +Example: "HelpMenu" + ### SortAndFilter This layout contains the panel displaying the pipeline of sorters and filters applied of the list of paths being displayed. +Example: "SortAndFilter" + +### Custom Content + +Custom content is a special layout to render something custom. +It contains the following information: + +- [title][33] +- [body][34] + +Example: { CustomContent = { title = [title][33], body = [body][34] } + ### Horizontal This is a special layout that splits the panel into two horizontal parts. @@ -72,6 +92,8 @@ It contains the following information: - [config][15] - [splits][17] +Example: { Horizontal = { config = [config][15], splits = [splits][17] } + ### Vertical This is a special layout that splits the panel into two vertical parts. @@ -81,6 +103,8 @@ It contains the following information: - [config][15] - [splits][17] +Example: { Vertical = { config = [config][15], splits = [splits][17] } + ## Layout Config A layout config contains the following information: @@ -144,21 +168,13 @@ Type: list of [Layout][3] The list of child layouts to fit into the parent layout. -## Custom Content - -Custom content is a special layout to render something custom. -It contains the following information: - -- [title][33] -- [body][34] - -### title +## title Type: nullable string The title of the panel. -### body +## body Type: [Content Body][26] @@ -175,7 +191,7 @@ Content body can be one of the following: - [StaticTable][31] - [DynamicTable][32] -### Static Paragraph +## Static Paragraph A paragraph to render. It contains the following fields: @@ -194,7 +210,7 @@ xplr.config.layouts.builtin.default = { } ``` -### Dynamic Paragraph +## Dynamic Paragraph A [Lua function][35] to render a custom paragraph. It contains the following fields: @@ -217,7 +233,7 @@ xplr.fn.custom.render_layout = function(ctx) end ``` -### Static List +## Static List A list to render. It contains the following fields: @@ -236,7 +252,7 @@ xplr.config.layouts.builtin.default = { } ``` -### Dynamic List +## Dynamic List A [Lua function][35] to render a custom list. It contains the following fields: @@ -262,7 +278,7 @@ xplr.fn.custom.render_layout = function(ctx) end ``` -### Static Table +## Static Table A table to render. It contains the following fields: @@ -293,7 +309,7 @@ xplr.config.layouts.builtin.default = { } ``` -### Dynamic Table +## Dynamic Table A [Lua function][35] to render a custom table. It contains the following fields: diff --git a/docs/en/src/message.md b/docs/en/src/message.md index 298fffb..51063e5 100644 --- a/docs/en/src/message.md +++ b/docs/en/src/message.md @@ -17,17 +17,17 @@ To send messages using the [key bindings][2] or [Lua function calls][3], messages are represented in [Lua][5] syntax. For example: -- "Quit" -- { FocusPath = "/path/to/file" } -- { Call = { command = "bash", args = { "-c", "read -p test" } } } +- `"Quit"` +- `{ FocusPath = "/path/to/file" }` +- `{ Call = { command = "bash", args = { "-c", "read -p test" } } }` However, to send messages using the [input pipe][4], they need to be represented using [YAML][6] (or [JSON][7]) syntax. For example: -- Quit -- FocusPath: "/path/to/file" -- Call: { command: bash, args: ["-c", "read -p test"] } +- `Quit` +- `FocusPath: "/path/to/file"` +- `Call: { command: bash, args: ["-c", "read -p test"] }` ## Also See: diff --git a/docs/en/src/messages.md b/docs/en/src/messages.md index 8f8158a..9366af8 100644 --- a/docs/en/src/messages.md +++ b/docs/en/src/messages.md @@ -30,7 +30,7 @@ This operation is expensive. So, try to avoid using it too often. Example: -- Lua: "ExplorePwd" +- Lua: `"ExplorePwd"` - YAML: `ExplorePwd` #### ExplorePwdAsync @@ -43,7 +43,7 @@ $PWD synchronously, use `ExplorePwd` instead. Example: -- Lua: "ExplorePwdAsync" +- Lua: `"ExplorePwdAsync"` - YAML: `ExplorePwdAsync` #### ExploreParentsAsync @@ -57,7 +57,7 @@ instead. Example: -- Lua: "ExploreParentsAsync" +- Lua: `"ExploreParentsAsync"` - YAML: `ExploreParentsAsync` ### Screen @@ -68,7 +68,7 @@ Clear the screen. Example: -- Lua: "ClearScreen" +- Lua: `"ClearScreen"`` - YAML: `ClearScreen` #### Refresh @@ -81,7 +81,7 @@ Also, it will not clear the screen. Use `ClearScreen` for that. Example: -- Lua: "Refresh" +- Lua: `"Refresh"` - YAML: `Refresh` ### Navigation @@ -92,7 +92,7 @@ Focus next node. Example: -- Lua: "FocusNext" +- Lua: `"FocusNext"` - YAML: `FocusNext` #### FocusNextByRelativeIndex @@ -104,7 +104,7 @@ Type: { FocusNextByRelativeIndex = int } Example: -- Lua: { FocusNextByRelativeIndex = 2 } +- Lua: `{ FocusNextByRelativeIndex = 2 }` - YAML: `FocusNextByRelativeIndex: 2` #### FocusNextByRelativeIndexFromInput @@ -114,7 +114,7 @@ from the input buffer. Example: -- Lua: "FocusNextByRelativeIndexFromInput" +- Lua: `"FocusNextByRelativeIndexFromInput"` - YAML: `FocusNextByRelativeIndexFromInput` #### FocusPrevious @@ -123,7 +123,7 @@ Focus on the previous item. Example: -- Lua: "FocusPrevious" +- Lua: `"FocusPrevious"` - YAML: `FocusPrevious` #### FocusPreviousByRelativeIndex @@ -145,7 +145,7 @@ read from the input buffer. Example: -- Lua: "FocusPreviousByRelativeIndexFromInput" +- Lua: `"FocusPreviousByRelativeIndexFromInput"` - YAML: `FocusPreviousByRelativeIndexFromInput` #### FocusFirst @@ -154,7 +154,7 @@ Focus on the first node. Example: -- Lua: "FocusFirst" +- Lua: `"FocusFirst"` - YAML: `FocusFirst` #### FocusLast @@ -163,7 +163,7 @@ Focus on the last node. Example: -- Lua: "FocusLast" +- Lua: `"FocusLast"` - YAML: `FocusLast` #### FocusPath @@ -183,7 +183,7 @@ Focus on the path read from input buffer. Example: -- Lua: "FocusPathFromInput" +- Lua: `"FocusPathFromInput"` - YAML: `FocusPathFromInput` #### FocusByIndex @@ -194,7 +194,7 @@ Type: { FocusByIndex = int } Example: -- Lua: { FocusByIndex = 2 } +- Lua: `{ FocusByIndex = 2 }` - YAML: `FocusByIndex: 2` #### FocusByIndexFromInput @@ -203,7 +203,7 @@ Focus on the absolute `n`th node where `n` is read from the input buffer. Example: -- Lua: "FocusByIndexFromInput" +- Lua: `"FocusByIndexFromInput"` - YAML: `FocusByIndexFromInput` #### FocusByFileName @@ -216,7 +216,7 @@ Type: { FocusByFileName = "string" } Example: -- Lua: { FocusByFileName = "filename.ext" } +- Lua: `{ FocusByFileName = "filename.ext" }` - YAML: `FocusByFileName: filename.ext` #### ChangeDirectory @@ -227,7 +227,7 @@ Type: { ChangeDirectory = "string" } Example: -- Lua: { ChangeDirectory = "/path/to/directory" } +- Lua: `{ ChangeDirectory = "/path/to/directory" }` - YAML: `ChangeDirectory: /path/to/directory` #### Enter @@ -236,7 +236,7 @@ Enter into the currently focused path if it's a directory. Example: -- Lua: "Enter" +- Lua: `"Enter"` - YAML: `Enter` #### Back @@ -245,7 +245,7 @@ Go back to the parent directory. Example: -- Lua:"Back" +- Lua: `"Back"` - YAML: `Back` #### LastVisitedPath @@ -254,7 +254,7 @@ Go to the last path visited. Example: -- Lua: "LastVisitedPath" +- Lua: `"LastVisitedPath"` - YAML: `LastVisitedPath` #### NextVisitedPath @@ -263,7 +263,7 @@ Go to the next path visited. Example: -- Lua: "NextVisitedPath" +- Lua: `"NextVisitedPath"` - YAML: `NextVisitedPath` #### FollowSymlink @@ -272,7 +272,7 @@ Follow the symlink under focus to its actual location. Example: -Lua: "FollowSymlink" +Lua: `"FollowSymlink"` YAML: `FollowSymlink` ### Reading Input @@ -285,7 +285,7 @@ Type: { UpdateInputBuffer = [Input Opertaion](https://xplr.dev/en/input-operatio Example: -- Lua: { UpdateInputBuffer = "GoToPreviousWord" } +- Lua: `{ UpdateInputBuffer = "GoToPreviousWord" }` - YAML: `UpdateInputBuffer: GoToPreviousWord` #### UpdateInputBufferFromKey @@ -294,7 +294,7 @@ Update the input buffer from the key read from keyboard input. Example: -- Lua: "UpdateInputBufferFromKey" +- Lua: `"UpdateInputBufferFromKey"` - YAML: `UpdateInputBufferFromKey` #### BufferInput @@ -305,7 +305,7 @@ Type: { BufferInput = "string" } Example: -- Lua: { BufferInput = "foo" } +- Lua: `{ BufferInput = "foo" }` - YAML: `BufferInput: foo` #### BufferInputFromKey @@ -315,7 +315,7 @@ input buffer. Example: -- Lua: "BufferInputFromKey" +- Lua: `"BufferInputFromKey"` - YAML: `BufferInputFromKey` #### SetInputBuffer @@ -328,7 +328,7 @@ Type: { SetInputBuffer = "string" } Example: -- Lua: { SetInputBuffer = "foo" } +- Lua: `{ SetInputBuffer = "foo" }` - YAML: `SetInputBuffer: foo` #### RemoveInputBufferLastCharacter @@ -337,7 +337,7 @@ Remove input buffer's last character. Example: -- Lua: "RemoveInputBufferLastCharacter" +- Lua: `"RemoveInputBufferLastCharacter"` - YAML: `RemoveInputBufferLastCharacter` #### RemoveInputBufferLastWord @@ -346,7 +346,7 @@ Remove input buffer's last word. Example: -- Lua: "RemoveInputBufferLastWord" +- Lua: `"RemoveInputBufferLastWord"` - YAML: `RemoveInputBufferLastWord` #### ResetInputBuffer @@ -355,7 +355,7 @@ Reset the input buffer back to null. It will not show in the UI. Example: -- Lua: "ResetInputBuffer" +- Lua: `"ResetInputBuffer"` - YAML: `ResetInputBuffer` ### Switching Mode @@ -368,7 +368,7 @@ Type : { SwitchMode = "string" } Example: -- Lua: { SwitchMode = "default" } +- Lua: `{ SwitchMode = "default" }` - YAML: SwitchMode: default > **NOTE:** To be specific about which mode to switch to, use @@ -384,7 +384,7 @@ Type: { SwitchModeKeepingInputBuffer = "string" } Example: -- Lua: { SwitchModeKeepingInputBuffer = "default" } +- Lua: `{ SwitchModeKeepingInputBuffer = "default" }` - YAML: `SwitchModeKeepingInputBuffer: default` > **NOTE:** To be specific about which mode to switch to, use @@ -400,7 +400,7 @@ Type: { SwitchModeBuiltin = "string" } Example: -- Lua: { SwitchModeBuiltin = "default" } +- Lua: `{ SwitchModeBuiltin = "default" }` - YAML: `SwitchModeBuiltin: default` #### SwitchModeBuiltinKeepingInputBuffer @@ -412,7 +412,7 @@ Type: { SwitchModeBuiltinKeepingInputBuffer = "string" } Example: -- Lua: { SwitchModeBuiltinKeepingInputBuffer = "default" } +- Lua: `{ SwitchModeBuiltinKeepingInputBuffer = "default" }` - YAML: `SwitchModeBuiltinKeepingInputBuffer: default` #### SwitchModeCustom @@ -424,7 +424,7 @@ Type: { SwitchModeCustom = "string" } Example: -- Lua: { SwitchModeCustom = "my_custom_mode" } +- Lua: `{ SwitchModeCustom = "my_custom_mode" }` - YAML: `SwitchModeCustom: my_custom_mode` #### SwitchModeCustomKeepingInputBuffer @@ -436,7 +436,7 @@ Type: { SwitchModeCustomKeepingInputBuffer = "string" } Example: -- Lua: { SwitchModeCustomKeepingInputBuffer = "my_custom_mode" } +- Lua: `{ SwitchModeCustomKeepingInputBuffer = "my_custom_mode" }` - YAML: `SwitchModeCustomKeepingInputBuffer: my_custom_mode` #### PopMode @@ -446,7 +446,7 @@ It clears the input buffer. Example: -- Lua: "PopMode" +- Lua: `"PopMode"` - YAML: `PopMode` #### PopModeKeepingInputBuffer @@ -456,7 +456,7 @@ It keeps the input buffer. Example: -- Lua: PopModeKeepingInputBuffer +- Lua: `PopModeKeepingInputBuffer` - YAML: `PopModeKeepingInputBuffer` ### Switching Layout @@ -469,7 +469,7 @@ Type: { SwitchLayout = "string" } Example: -- Lua: { SwitchLayout = "default" } +- Lua: `{ SwitchLayout = "default" }` - YAML: `SwitchLayout: default` > **NOTE:** To be specific about which layout to switch to, use `SwitchLayoutBuiltin` or @@ -483,7 +483,7 @@ Type: { SwitchLayoutBuiltin = "string" } Example: -- Lua: { SwitchLayoutBuiltin = "default" } +- Lua: `{ SwitchLayoutBuiltin = "default" }` - YAML: `SwitchLayoutBuiltin: default` #### SwitchLayoutCustom @@ -494,7 +494,7 @@ Type: { SwitchLayoutCustom = "string" } Example: -- Lua: { SwitchLayoutCustom = "my_custom_layout" } +- Lua: `{ SwitchLayoutCustom = "my_custom_layout" }` - YAML: `SwitchLayoutCustom: my_custom_layout` ### Executing Commands @@ -511,7 +511,7 @@ Type: { Call = "string" } Example: -- Lua: { Call = { command = "bash", args = { "-c", "read -p test" } } } +- Lua: `{ Call = { command = "bash", args = { "-c", "read -p test" } } }` - YAML: `Call: { command: bash, args: ["-c", "read -p test"] }` #### CallSilently @@ -535,7 +535,7 @@ Type: { BashExec = "string" } Example: -- Lua: { BashExec = "read -p test" } +- Lua: `{ BashExec = "read -p test" }` - YAML: `BashExec: "read -p test"` #### BashExecSilently @@ -547,7 +547,7 @@ Type: { BashExecSilently = "string" } Example: -- Lua: { BashExecSilently = "tput bell" } +- Lua: `{ BashExecSilently = "tput bell" }` - YAML: `BashExecSilently: "tput bell"` ### Calling Lua Functions @@ -565,7 +565,7 @@ Type: { CallLua = "string" } Example: -- Lua: { CallLua = "custom.some_custom_funtion" } +- Lua: `{ CallLua = "custom.some_custom_funtion" }` - YAML: `CallLua: custom.some_custom_funtion` #### CallLuaSilently @@ -577,7 +577,7 @@ Type: { CallLuaSilently = "string" } Example: -- Lua: { CallLuaSilently = "custom.some_custom_function" } +- Lua: `{ CallLuaSilently = "custom.some_custom_function" }` - YAML: `CallLuaSilently: custom.some_custom_function` #### LuaEval @@ -592,8 +592,8 @@ Type: { LuaEval = "string" } Example: -- Lua: { LuaEval = [[return { { LogInfo = io.read() } }]] } -- Lua: { LuaEval = [[function(app) return { { LogInfo = app.pwd } } end]] } +- Lua: `{ LuaEval = [[return { { LogInfo = io.read() } }]] }` +- Lua: `{ LuaEval = [[function(app) return { { LogInfo = app.pwd } } end]] }` - YAML: `LuaEval: "return { { LogInfo = io.read() } }"` - YAML: `LuaEval: "function(app) return { { LogInfo = app.pwd } } end"` @@ -606,7 +606,7 @@ Type: { LuaEvalSilently = "string" } Example: -- Lua: { LuaEvalSilently = [[return { { LogInfo = "foo" } }]] } +- Lua: `{ LuaEvalSilently = [[return { { LogInfo = "foo" } }]] }` - YAML: `LuaEvalSilently: "return { { LogInfo = 'foo' } }"` ### Select Operations @@ -617,7 +617,7 @@ Select the focused node. Example: -- Lua: "Select" +- Lua: `"Select"` - YAML: `Select` #### SelectAll @@ -626,7 +626,7 @@ Select all the visible nodes. Example: -- Lua: "SelectAll" +- Lua: `"SelectAll"` - YAML: `SelectAll` #### SelectPath @@ -637,7 +637,7 @@ Type: { SelectPath = "string" } Example: -- Lua: { SelectPath = "/path/to/file" } +- Lua: `{ SelectPath = "/path/to/file" }` - YAML: `SelectPath: /path/to/file` #### UnSelect @@ -646,7 +646,7 @@ Unselect the focused node. Example: -- Lua: "UnSelect" +- Lua: `"UnSelect"` - YAML: `UnSelect` #### UnSelectAll @@ -655,7 +655,7 @@ Unselect all the visible nodes. Example: -- Lua: "UnSelectAll" +- Lua: `"UnSelectAll"` - YAML: `UnSelectAll` #### UnSelectPath @@ -666,7 +666,7 @@ Type: { UnSelectPath = "string)" } Example: -- Lua: { UnSelectPath = "/path/to/file" } +- Lua: `{ UnSelectPath = "/path/to/file" }` - YAML: `UnSelectPath: /path/to/file` #### ToggleSelection @@ -675,7 +675,7 @@ Toggle selection on the focused node. Example: -- Lua: "ToggleSelection" +- Lua: `"ToggleSelection"` - YAML `ToggleSelection` #### ToggleSelectAll @@ -683,7 +683,7 @@ Example: Toggle between select all and unselect all. Example: -- Lua: "ToggleSelectAll" +- Lua: `"ToggleSelectAll"` - YAML: `ToggleSelectAll` #### ToggleSelectionByPath @@ -694,7 +694,7 @@ Type: { ToggleSelectionByPath = "string" } Example: -- Lua: { ToggleSelectionByPath = "/path/to/file" } +- Lua: `{ ToggleSelectionByPath = "/path/to/file" }` - YAML: `ToggleSelectionByPath: /path/to/file` #### ClearSelection @@ -703,7 +703,7 @@ Clear the selection. Example: -- Lua: "ClearSelection" +- Lua: `"ClearSelection"` - YAML: `ClearSelection` ### Filter Operations @@ -717,7 +717,7 @@ Type: { AddNodeFilter = { filter = [Filter](https://xplr.dev/en/filtering#filter Example: -- Lua: { AddNodeFilter = { filter = "RelativePathDoesStartWith", input = "foo" } } +- Lua: `{ AddNodeFilter = { filter = "RelativePathDoesStartWith", input = "foo" } }` - YAML: `AddNodeFilter: { filter: RelativePathDoesStartWith, input: foo }` #### RemoveNodeFilter @@ -728,7 +728,7 @@ Type: { RemoveNodeFilter = { filter = [Filter](https://xplr.dev/en/filtering), i Example: -- Lua: { RemoveNodeFilter: { filter: "RelativePathDoesStartWith", input: "foo" } } +- Lua: `{ RemoveNodeFilter: { filter: "RelativePathDoesStartWith", input: "foo" } }` - YAML: `RemoveNodeFilter: { filter: RelativePathDoesStartWith, input: foo }` #### ToggleNodeFilter @@ -740,7 +740,7 @@ Type: { ToggleNodeFilter = { filter = [Filter](https://xplr.dev/en/filtering), i Example: -- Lua: { ToggleNodeFilter = { filter = "RelativePathDoesStartWith", input = "foo" } } +- Lua: `{ ToggleNodeFilter = { filter = "RelativePathDoesStartWith", input = "foo" } }` - YAML: `ToggleNodeFilter: { filter: RelativePathDoesStartWith, input: foo }` #### AddNodeFilterFromInput @@ -752,7 +752,7 @@ Type: { AddNodeFilterFromInput = [Filter](https://xplr.dev/en/filtering) } Example: -- Lua: { AddNodeFilterFromInput = "RelativePathDoesStartWith" } +- Lua: `{ AddNodeFilterFromInput = "RelativePathDoesStartWith" }` - YAML: `AddNodeFilterFromInput: RelativePathDoesStartWith` #### RemoveNodeFilterFromInput @@ -764,7 +764,7 @@ Type: { RemoveNodeFilterFromInput = [Filter](https://xplr.dev/en/filtering) } Example: -- Lua: { RemoveNodeFilterFromInput = "RelativePathDoesStartWith" } +- Lua: `{ RemoveNodeFilterFromInput = "RelativePathDoesStartWith" }` - YAML: `RemoveNodeFilterFromInput: RelativePathDoesStartWith` #### RemoveLastNodeFilter @@ -773,7 +773,7 @@ Remove the last node [filter](https://xplr.dev/en/filtering). Example: -- Lua: "RemoveLastNodeFilter" +- Lua: `"RemoveLastNodeFilter"` - YAML: `RemoveLastNodeFilter` #### ResetNodeFilters @@ -783,7 +783,7 @@ default configuration. Example: -- Lua: "ResetNodeFilters" +- Lua: `"ResetNodeFilters"` - YAML: `ResetNodeFilters` #### ClearNodeFilters @@ -792,7 +792,7 @@ Clear all the node [filters](https://xplr.dev/en/filtering). Example: -- Lua: "ClearNodeFilters" +- Lua: `"ClearNodeFilters"` - YAML: `ClearNodeFilters` ### Sort Operations @@ -806,7 +806,7 @@ Type: { AddNodeSorter = { sorter = [Sorter](https://xplr.dev/en/sorting#sorter), Example: -- Lua: { AddNodeSorter = { sorter = "ByRelativePath", reverse = false } } +- Lua: `{ AddNodeSorter = { sorter = "ByRelativePath", reverse = false } }` - YAML: `AddNodeSorter: { sorter: ByRelativePath, reverse: false }` #### RemoveNodeSorter @@ -817,7 +817,7 @@ Type: { RemoveNodeSorter = [Sorter](https://xplr.dev/en/sorting#sorter) } Example: -- Lua: { RemoveNodeSorter = "ByRelativePath" } +- Lua: `{ RemoveNodeSorter = "ByRelativePath" }` - YAML: `RemoveNodeSorter: ByRelativePath` #### ReverseNodeSorter @@ -828,7 +828,7 @@ Type: { ReverseNodeSorter = [Sorter](https://xplr.dev/en/sorting#sorter) } Example: -- Lua: { ReverseNodeSorter = "ByRelativePath" } +- Lua: `{ ReverseNodeSorter = "ByRelativePath" }` - YAML: `ReverseNodeSorter: ByRelativePath` #### ToggleNodeSorter @@ -840,7 +840,7 @@ Type: { ToggleNodeSorter = { sorter = [Sorter](https://xplr.dev/en/sorting#sorte Example: -- Lua: { ToggleSorterSorter: { sorter = "ByRelativePath", reverse = false } } +- Lua: `{ ToggleSorterSorter: { sorter = "ByRelativePath", reverse = false } }` - YAML: `ToggleSorterSorter: {sorter: ByRelativePath, reverse: false }` #### ReverseNodeSorters @@ -849,7 +849,7 @@ Reverse the node [sorters](https://xplr.dev/en/sorting#sorter). Example: -- Lua: "ReverseNodeSorters" +- Lua: `"ReverseNodeSorters"` - YAML: `ReverseNodeSorters` #### RemoveLastNodeSorter @@ -858,7 +858,7 @@ Remove the last node [sorter](https://xplr.dev/en/sorting#sorter). Example: -- Lua: "RemoveLastNodeSorter" +- Lua: `"RemoveLastNodeSorter"` - YAML: `RemoveLastNodeSorter` #### ResetNodeSorters @@ -868,7 +868,7 @@ the default configuration. Example: -- Lua: "ResetNodeSorters" +- Lua: `"ResetNodeSorters"` - YAML: `ResetNodeSorters` #### ClearNodeSorters @@ -877,7 +877,7 @@ Clear all the node [sorters](https://xplr.dev/en/sorting#sorter). Example: -- Lua: "ClearNodeSorters" +- Lua: `"ClearNodeSorters"` - YAML: `ClearNodeSorters` ### Mouse Operations @@ -888,7 +888,7 @@ Enable mouse Example: -- Lua: "EnableMouse" +- Lua: `"EnableMouse"` - YAML: `EnableMouse` #### DisableMouse @@ -897,7 +897,7 @@ Disable mouse Example: -- Lua: "DisableMouse" +- Lua: `"DisableMouse"` - YAML: `DisableMouse` #### ToggleMouse @@ -906,7 +906,7 @@ Toggle mouse Example: -- Lua: "ToggleMouse" +- Lua: `"ToggleMouse"` - YAML: `ToggleMouse` ### Fifo Operations @@ -919,7 +919,7 @@ Type: { StartFifo = "string" } Example: -- Lua: { StartFifo = "/tmp/xplr.fifo } +- Lua: `{ StartFifo = "/tmp/xplr.fifo }` - YAML: `StartFifo: /tmp/xplr.fifo` #### StopFifo @@ -928,7 +928,7 @@ Close the active fifo and stop piping. Example: -- Lua: "StopFifo" +- Lua: `"StopFifo"` - YAML: `StopFifo` #### ToggleFifo @@ -939,7 +939,7 @@ Type: { ToggleFifo = "string" } Example: -- Lua: { ToggleFifo = "/path/to/fifo" } +- Lua: `{ ToggleFifo = "/path/to/fifo" }` - YAML: `ToggleFifo: /path/to/fifo` ### Logging @@ -952,7 +952,7 @@ Type: { LogInfo = "string" } Example: -- Lua: { LogInfo = "launching satellite" } +- Lua: `{ LogInfo = "launching satellite" }` - YAML: `LogInfo: launching satellite` #### LogSuccess @@ -963,7 +963,7 @@ Type: { LogSuccess = "String" } Example: -- Lua: { LogSuccess = "satellite reached destination" } +- Lua: `{ LogSuccess = "satellite reached destination" }` - YAML: `LogSuccess: satellite reached destination` #### LogWarning @@ -974,7 +974,7 @@ Type: { LogWarning = "string" } Example: -- Lua: { LogWarning = "satellite is heating" } +- Lua: `{ LogWarning = "satellite is heating" }` - YAML: `LogWarning: satellite is heating` #### LogError @@ -985,7 +985,7 @@ Type: { LogError = "string" } Example: -- Lua: { LogError = "satellite crashed" } +- Lua: `{ LogError = "satellite crashed" }` - YAML: `LogError: satellite crashed` ### Debugging @@ -999,7 +999,7 @@ Type: { Debug = "string" } Example: -- Lua: { Debug = "/path/to/file" } +- Lua: `{ Debug = "/path/to/file" }` - YAML: `Debug: /path/to/file` ### Quit Options @@ -1008,7 +1008,7 @@ Example: Example: -- Lua: "Quit" +- Lua: `"Quit"` - YAML: `Quit` Quit with returncode zero (success). @@ -1019,7 +1019,7 @@ Print $PWD and quit. Example: -- Lua: "PrintPwdAndQuit" +- Lua: `"PrintPwdAndQuit"` - YAML: `PrintPwdAndQuit` #### PrintFocusPathAndQuit @@ -1029,7 +1029,7 @@ nothing to focus. Example: -- Lua: "PrintFocusPathAndQuit" +- Lua: `"PrintFocusPathAndQuit"` - YAML: `PrintFocusPathAndQuit` #### PrintSelectionAndQuit @@ -1039,7 +1039,7 @@ selected. Example: -- Lua: "PrintSelectionAndQuit" +- Lua: `"PrintSelectionAndQuit"` - YAML: `PrintSelectionAndQuit` #### PrintResultAndQuit @@ -1049,7 +1049,7 @@ node's path. Example: -- Lua: "PrintResultAndQuit" +- Lua: `"PrintResultAndQuit"` - YAML: `PrintResultAndQuit` #### PrintAppStateAndQuit @@ -1059,7 +1059,7 @@ generating the default configuration file. Example: -- Lua: "PrintAppStateAndQuit" +- Lua: `"PrintAppStateAndQuit"` - YAML: `PrintAppStateAndQuit` #### Terminate @@ -1068,7 +1068,7 @@ Terminate the application with a non-zero return code. Example: -- Lua: "Terminate" +- Lua: `"Terminate"` - YAML: `Terminate` ## Also See: diff --git a/docs/script/generate.py b/docs/script/generate.py index 36c56e3..cf90439 100644 --- a/docs/script/generate.py +++ b/docs/script/generate.py @@ -1,8 +1,8 @@ """Generate docs from comments.""" -from dataclasses import dataclass, field +import os +from dataclasses import dataclass from typing import List -from enum import Enum # Messages -------------------------------------------------------------------- @@ -216,9 +216,14 @@ def gen_configuration(): print(doc, file=f) +def format_docs(): + os.system("prettier --write docs/en/src") + + def main(): gen_messages() gen_configuration() + format_docs() if __name__ == "__main__": diff --git a/src/msg/in_/external.rs b/src/msg/in_/external.rs index 08cb4aa..0a6815c 100644 --- a/src/msg/in_/external.rs +++ b/src/msg/in_/external.rs @@ -12,7 +12,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: "ExplorePwd" + /// - Lua: `"ExplorePwd"` /// - YAML: `ExplorePwd` ExplorePwd, @@ -24,7 +24,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: "ExplorePwdAsync" + /// - Lua: `"ExplorePwdAsync"` /// - YAML: `ExplorePwdAsync` ExplorePwdAsync, @@ -37,7 +37,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: "ExploreParentsAsync" + /// - Lua: `"ExploreParentsAsync"` /// - YAML: `ExploreParentsAsync` ExploreParentsAsync, @@ -47,7 +47,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: "ClearScreen" + /// - Lua: `"ClearScreen"`` /// - YAML: `ClearScreen` ClearScreen, @@ -59,7 +59,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: "Refresh" + /// - Lua: `"Refresh"` /// - YAML: `Refresh` Refresh, @@ -69,7 +69,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: "FocusNext" + /// - Lua: `"FocusNext"` /// - YAML: `FocusNext` FocusNext, @@ -80,7 +80,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: { FocusNextByRelativeIndex = 2 } + /// - Lua: `{ FocusNextByRelativeIndex = 2 }` /// - YAML: `FocusNextByRelativeIndex: 2` FocusNextByRelativeIndex(usize), @@ -89,7 +89,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: "FocusNextByRelativeIndexFromInput" + /// - Lua: `"FocusNextByRelativeIndexFromInput"` /// - YAML: `FocusNextByRelativeIndexFromInput` FocusNextByRelativeIndexFromInput, @@ -97,7 +97,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: "FocusPrevious" + /// - Lua: `"FocusPrevious"` /// - YAML: `FocusPrevious` FocusPrevious, @@ -117,7 +117,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: "FocusPreviousByRelativeIndexFromInput" + /// - Lua: `"FocusPreviousByRelativeIndexFromInput"` /// - YAML: `FocusPreviousByRelativeIndexFromInput` FocusPreviousByRelativeIndexFromInput, @@ -125,7 +125,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: "FocusFirst" + /// - Lua: `"FocusFirst"` /// - YAML: `FocusFirst` /// FocusFirst, @@ -133,7 +133,7 @@ pub enum ExternalMsg { /// Focus on the last node. /// /// Example: - /// - Lua: "FocusLast" + /// - Lua: `"FocusLast"` /// - YAML: `FocusLast` FocusLast, @@ -151,7 +151,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: "FocusPathFromInput" + /// - Lua: `"FocusPathFromInput"` /// - YAML: `FocusPathFromInput` FocusPathFromInput, @@ -161,7 +161,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: { FocusByIndex = 2 } + /// - Lua: `{ FocusByIndex = 2 }` /// - YAML: `FocusByIndex: 2` FocusByIndex(usize), @@ -169,7 +169,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: "FocusByIndexFromInput" + /// - Lua: `"FocusByIndexFromInput"` /// - YAML: `FocusByIndexFromInput` FocusByIndexFromInput, @@ -182,7 +182,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: { FocusByFileName = "filename.ext" } + /// - Lua: `{ FocusByFileName = "filename.ext" }` /// - YAML: `FocusByFileName: filename.ext` FocusByFileName(String), @@ -192,7 +192,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: { ChangeDirectory = "/path/to/directory" } + /// - Lua: `{ ChangeDirectory = "/path/to/directory" }` /// - YAML: `ChangeDirectory: /path/to/directory` ChangeDirectory(String), @@ -200,7 +200,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: "Enter" + /// - Lua: `"Enter"` /// - YAML: `Enter` Enter, @@ -208,7 +208,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua:"Back" + /// - Lua: `"Back"` /// - YAML: `Back` Back, @@ -216,7 +216,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: "LastVisitedPath" + /// - Lua: `"LastVisitedPath"` /// - YAML: `LastVisitedPath` LastVisitedPath, @@ -224,7 +224,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: "NextVisitedPath" + /// - Lua: `"NextVisitedPath"` /// - YAML: `NextVisitedPath` NextVisitedPath, @@ -233,7 +233,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// Lua: "FollowSymlink" + /// Lua: `"FollowSymlink"` /// YAML: `FollowSymlink` FollowSymlink, @@ -245,7 +245,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: { UpdateInputBuffer = "GoToPreviousWord" } + /// - Lua: `{ UpdateInputBuffer = "GoToPreviousWord" }` /// - YAML: `UpdateInputBuffer: GoToPreviousWord` UpdateInputBuffer(InputOperation), @@ -253,7 +253,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: "UpdateInputBufferFromKey" + /// - Lua: `"UpdateInputBufferFromKey"` /// - YAML: `UpdateInputBufferFromKey` UpdateInputBufferFromKey, @@ -263,7 +263,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: { BufferInput = "foo" } + /// - Lua: `{ BufferInput = "foo" }` /// - YAML: `BufferInput: foo` BufferInput(String), @@ -272,7 +272,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: "BufferInputFromKey" + /// - Lua: `"BufferInputFromKey"` /// - YAML: `BufferInputFromKey` BufferInputFromKey, @@ -284,7 +284,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: { SetInputBuffer = "foo" } + /// - Lua: `{ SetInputBuffer = "foo" }` /// - YAML: `SetInputBuffer: foo` SetInputBuffer(String), @@ -292,7 +292,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: "RemoveInputBufferLastCharacter" + /// - Lua: `"RemoveInputBufferLastCharacter"` /// - YAML: `RemoveInputBufferLastCharacter` RemoveInputBufferLastCharacter, @@ -300,7 +300,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: "RemoveInputBufferLastWord" + /// - Lua: `"RemoveInputBufferLastWord"` /// - YAML: `RemoveInputBufferLastWord` RemoveInputBufferLastWord, @@ -308,7 +308,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: "ResetInputBuffer" + /// - Lua: `"ResetInputBuffer"` /// - YAML: `ResetInputBuffer` ResetInputBuffer, @@ -320,7 +320,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: { SwitchMode = "default" } + /// - Lua: `{ SwitchMode = "default" }` /// - YAML: SwitchMode: default /// /// > **NOTE:** To be specific about which mode to switch to, use @@ -335,7 +335,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: { SwitchModeKeepingInputBuffer = "default" } + /// - Lua: `{ SwitchModeKeepingInputBuffer = "default" }` /// - YAML: `SwitchModeKeepingInputBuffer: default` /// /// > **NOTE:** To be specific about which mode to switch to, use @@ -350,7 +350,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: { SwitchModeBuiltin = "default" } + /// - Lua: `{ SwitchModeBuiltin = "default" }` /// - YAML: `SwitchModeBuiltin: default` SwitchModeBuiltin(String), @@ -361,7 +361,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: { SwitchModeBuiltinKeepingInputBuffer = "default" } + /// - Lua: `{ SwitchModeBuiltinKeepingInputBuffer = "default" }` /// - YAML: `SwitchModeBuiltinKeepingInputBuffer: default` SwitchModeBuiltinKeepingInputBuffer(String), @@ -372,7 +372,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: { SwitchModeCustom = "my_custom_mode" } + /// - Lua: `{ SwitchModeCustom = "my_custom_mode" }` /// - YAML: `SwitchModeCustom: my_custom_mode` SwitchModeCustom(String), @@ -383,7 +383,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: { SwitchModeCustomKeepingInputBuffer = "my_custom_mode" } + /// - Lua: `{ SwitchModeCustomKeepingInputBuffer = "my_custom_mode" }` /// - YAML: `SwitchModeCustomKeepingInputBuffer: my_custom_mode` SwitchModeCustomKeepingInputBuffer(String), @@ -392,7 +392,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: "PopMode" + /// - Lua: `"PopMode"` /// - YAML: `PopMode` PopMode, @@ -401,7 +401,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: PopModeKeepingInputBuffer + /// - Lua: `PopModeKeepingInputBuffer` /// - YAML: `PopModeKeepingInputBuffer` PopModeKeepingInputBuffer, @@ -413,7 +413,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: { SwitchLayout = "default" } + /// - Lua: `{ SwitchLayout = "default" }` /// - YAML: `SwitchLayout: default` /// /// > **NOTE:** To be specific about which layout to switch to, use `SwitchLayoutBuiltin` or @@ -426,7 +426,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: { SwitchLayoutBuiltin = "default" } + /// - Lua: `{ SwitchLayoutBuiltin = "default" }` /// - YAML: `SwitchLayoutBuiltin: default` SwitchLayoutBuiltin(String), @@ -436,7 +436,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: { SwitchLayoutCustom = "my_custom_layout" } + /// - Lua: `{ SwitchLayoutCustom = "my_custom_layout" }` /// - YAML: `SwitchLayoutCustom: my_custom_layout` SwitchLayoutCustom(String), @@ -452,7 +452,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: { Call = { command = "bash", args = { "-c", "read -p test" } } } + /// - Lua: `{ Call = { command = "bash", args = { "-c", "read -p test" } } }` /// - YAML: `Call: { command: bash, args: ["-c", "read -p test"] }` Call(Command), @@ -474,7 +474,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: { BashExec = "read -p test" } + /// - Lua: `{ BashExec = "read -p test" }` /// - YAML: `BashExec: "read -p test"` BashExec(String), @@ -485,7 +485,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: { BashExecSilently = "tput bell" } + /// - Lua: `{ BashExecSilently = "tput bell" }` /// - YAML: `BashExecSilently: "tput bell"` BashExecSilently(String), @@ -502,7 +502,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: { CallLua = "custom.some_custom_funtion" } + /// - Lua: `{ CallLua = "custom.some_custom_funtion" }` /// - YAML: `CallLua: custom.some_custom_funtion` CallLua(String), @@ -513,7 +513,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: { CallLuaSilently = "custom.some_custom_function" } + /// - Lua: `{ CallLuaSilently = "custom.some_custom_function" }` /// - YAML: `CallLuaSilently: custom.some_custom_function` CallLuaSilently(String), @@ -527,8 +527,8 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: { LuaEval = [[return { { LogInfo = io.read() } }]] } - /// - Lua: { LuaEval = [[function(app) return { { LogInfo = app.pwd } } end]] } + /// - Lua: `{ LuaEval = [[return { { LogInfo = io.read() } }]] }` + /// - Lua: `{ LuaEval = [[function(app) return { { LogInfo = app.pwd } } end]] }` /// - YAML: `LuaEval: "return { { LogInfo = io.read() } }"` /// - YAML: `LuaEval: "function(app) return { { LogInfo = app.pwd } } end"` LuaEval(String), @@ -540,7 +540,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: { LuaEvalSilently = [[return { { LogInfo = "foo" } }]] } + /// - Lua: `{ LuaEvalSilently = [[return { { LogInfo = "foo" } }]] }` /// - YAML: `LuaEvalSilently: "return { { LogInfo = 'foo' } }"` LuaEvalSilently(String), @@ -550,7 +550,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: "Select" + /// - Lua: `"Select"` /// - YAML: `Select` Select, @@ -558,7 +558,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: "SelectAll" + /// - Lua: `"SelectAll"` /// - YAML: `SelectAll` SelectAll, @@ -568,7 +568,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: { SelectPath = "/path/to/file" } + /// - Lua: `{ SelectPath = "/path/to/file" }` /// - YAML: `SelectPath: /path/to/file` SelectPath(String), @@ -576,7 +576,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: "UnSelect" + /// - Lua: `"UnSelect"` /// - YAML: `UnSelect` UnSelect, @@ -584,7 +584,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: "UnSelectAll" + /// - Lua: `"UnSelectAll"` /// - YAML: `UnSelectAll` UnSelectAll, @@ -594,7 +594,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: { UnSelectPath = "/path/to/file" } + /// - Lua: `{ UnSelectPath = "/path/to/file" }` /// - YAML: `UnSelectPath: /path/to/file` UnSelectPath(String), @@ -602,14 +602,14 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: "ToggleSelection" + /// - Lua: `"ToggleSelection"` /// - YAML `ToggleSelection` ToggleSelection, /// Toggle between select all and unselect all. /// Example: /// - /// - Lua: "ToggleSelectAll" + /// - Lua: `"ToggleSelectAll"` /// - YAML: `ToggleSelectAll` ToggleSelectAll, @@ -619,7 +619,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: { ToggleSelectionByPath = "/path/to/file" } + /// - Lua: `{ ToggleSelectionByPath = "/path/to/file" }` /// - YAML: `ToggleSelectionByPath: /path/to/file` ToggleSelectionByPath(String), @@ -627,7 +627,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: "ClearSelection" + /// - Lua: `"ClearSelection"` /// - YAML: `ClearSelection` ClearSelection, @@ -640,7 +640,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: { AddNodeFilter = { filter = "RelativePathDoesStartWith", input = "foo" } } + /// - Lua: `{ AddNodeFilter = { filter = "RelativePathDoesStartWith", input = "foo" } }` /// - YAML: `AddNodeFilter: { filter: RelativePathDoesStartWith, input: foo }` AddNodeFilter(NodeFilterApplicable), @@ -650,7 +650,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: { RemoveNodeFilter: { filter: "RelativePathDoesStartWith", input: "foo" } } + /// - Lua: `{ RemoveNodeFilter: { filter: "RelativePathDoesStartWith", input: "foo" } }` /// - YAML: `RemoveNodeFilter: { filter: RelativePathDoesStartWith, input: foo }` RemoveNodeFilter(NodeFilterApplicable), @@ -661,7 +661,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: { ToggleNodeFilter = { filter = "RelativePathDoesStartWith", input = "foo" } } + /// - Lua: `{ ToggleNodeFilter = { filter = "RelativePathDoesStartWith", input = "foo" } }` /// - YAML: `ToggleNodeFilter: { filter: RelativePathDoesStartWith, input: foo }` ToggleNodeFilter(NodeFilterApplicable), @@ -672,7 +672,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: { AddNodeFilterFromInput = "RelativePathDoesStartWith" } + /// - Lua: `{ AddNodeFilterFromInput = "RelativePathDoesStartWith" }` /// - YAML: `AddNodeFilterFromInput: RelativePathDoesStartWith` AddNodeFilterFromInput(NodeFilter), @@ -683,7 +683,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: { RemoveNodeFilterFromInput = "RelativePathDoesStartWith" } + /// - Lua: `{ RemoveNodeFilterFromInput = "RelativePathDoesStartWith" }` /// - YAML: `RemoveNodeFilterFromInput: RelativePathDoesStartWith` RemoveNodeFilterFromInput(NodeFilter), @@ -691,7 +691,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: "RemoveLastNodeFilter" + /// - Lua: `"RemoveLastNodeFilter"` /// - YAML: `RemoveLastNodeFilter` RemoveLastNodeFilter, @@ -700,7 +700,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: "ResetNodeFilters" + /// - Lua: `"ResetNodeFilters"` /// - YAML: `ResetNodeFilters` ResetNodeFilters, @@ -708,7 +708,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: "ClearNodeFilters" + /// - Lua: `"ClearNodeFilters"` /// - YAML: `ClearNodeFilters` ClearNodeFilters, @@ -721,7 +721,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: { AddNodeSorter = { sorter = "ByRelativePath", reverse = false } } + /// - Lua: `{ AddNodeSorter = { sorter = "ByRelativePath", reverse = false } }` /// - YAML: `AddNodeSorter: { sorter: ByRelativePath, reverse: false }` AddNodeSorter(NodeSorterApplicable), @@ -731,7 +731,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: { RemoveNodeSorter = "ByRelativePath" } + /// - Lua: `{ RemoveNodeSorter = "ByRelativePath" }` /// - YAML: `RemoveNodeSorter: ByRelativePath` RemoveNodeSorter(NodeSorter), @@ -741,7 +741,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: { ReverseNodeSorter = "ByRelativePath" } + /// - Lua: `{ ReverseNodeSorter = "ByRelativePath" }` /// - YAML: `ReverseNodeSorter: ByRelativePath` ReverseNodeSorter(NodeSorter), @@ -752,7 +752,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: { ToggleSorterSorter: { sorter = "ByRelativePath", reverse = false } } + /// - Lua: `{ ToggleSorterSorter: { sorter = "ByRelativePath", reverse = false } }` /// - YAML: `ToggleSorterSorter: {sorter: ByRelativePath, reverse: false }` ToggleNodeSorter(NodeSorterApplicable), @@ -760,7 +760,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: "ReverseNodeSorters" + /// - Lua: `"ReverseNodeSorters"` /// - YAML: `ReverseNodeSorters` ReverseNodeSorters, @@ -768,7 +768,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: "RemoveLastNodeSorter" + /// - Lua: `"RemoveLastNodeSorter"` /// - YAML: `RemoveLastNodeSorter` RemoveLastNodeSorter, @@ -777,7 +777,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: "ResetNodeSorters" + /// - Lua: `"ResetNodeSorters"` /// - YAML: `ResetNodeSorters` ResetNodeSorters, @@ -785,7 +785,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: "ClearNodeSorters" + /// - Lua: `"ClearNodeSorters"` /// - YAML: `ClearNodeSorters` ClearNodeSorters, @@ -795,7 +795,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: "EnableMouse" + /// - Lua: `"EnableMouse"` /// - YAML: `EnableMouse` EnableMouse, @@ -803,7 +803,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: "DisableMouse" + /// - Lua: `"DisableMouse"` /// - YAML: `DisableMouse` DisableMouse, @@ -811,7 +811,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: "ToggleMouse" + /// - Lua: `"ToggleMouse"` /// - YAML: `ToggleMouse` ToggleMouse, @@ -823,7 +823,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: { StartFifo = "/tmp/xplr.fifo } + /// - Lua: `{ StartFifo = "/tmp/xplr.fifo }` /// - YAML: `StartFifo: /tmp/xplr.fifo` StartFifo(String), @@ -831,7 +831,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: "StopFifo" + /// - Lua: `"StopFifo"` /// - YAML: `StopFifo` StopFifo, @@ -841,7 +841,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: { ToggleFifo = "/path/to/fifo" } + /// - Lua: `{ ToggleFifo = "/path/to/fifo" }` /// - YAML: `ToggleFifo: /path/to/fifo` ToggleFifo(String), @@ -853,7 +853,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: { LogInfo = "launching satellite" } + /// - Lua: `{ LogInfo = "launching satellite" }` /// - YAML: `LogInfo: launching satellite` LogInfo(String), @@ -863,7 +863,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: { LogSuccess = "satellite reached destination" } + /// - Lua: `{ LogSuccess = "satellite reached destination" }` /// - YAML: `LogSuccess: satellite reached destination` LogSuccess(String), @@ -873,7 +873,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: { LogWarning = "satellite is heating" } + /// - Lua: `{ LogWarning = "satellite is heating" }` /// - YAML: `LogWarning: satellite is heating` LogWarning(String), @@ -883,7 +883,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: { LogError = "satellite crashed" } + /// - Lua: `{ LogError = "satellite crashed" }` /// - YAML: `LogError: satellite crashed` LogError(String), @@ -896,7 +896,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: { Debug = "/path/to/file" } + /// - Lua: `{ Debug = "/path/to/file" }` /// - YAML: `Debug: /path/to/file` Debug(String), @@ -904,7 +904,7 @@ pub enum ExternalMsg { /// Example: /// - /// - Lua: "Quit" + /// - Lua: `"Quit"` /// - YAML: `Quit` /// /// Quit with returncode zero (success). @@ -914,7 +914,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: "PrintPwdAndQuit" + /// - Lua: `"PrintPwdAndQuit"` /// - YAML: `PrintPwdAndQuit` PrintPwdAndQuit, @@ -923,7 +923,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: "PrintFocusPathAndQuit" + /// - Lua: `"PrintFocusPathAndQuit"` /// - YAML: `PrintFocusPathAndQuit` PrintFocusPathAndQuit, @@ -932,7 +932,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: "PrintSelectionAndQuit" + /// - Lua: `"PrintSelectionAndQuit"` /// - YAML: `PrintSelectionAndQuit` PrintSelectionAndQuit, @@ -941,7 +941,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: "PrintResultAndQuit" + /// - Lua: `"PrintResultAndQuit"` /// - YAML: `PrintResultAndQuit` PrintResultAndQuit, @@ -950,7 +950,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: "PrintAppStateAndQuit" + /// - Lua: `"PrintAppStateAndQuit"` /// - YAML: `PrintAppStateAndQuit` PrintAppStateAndQuit, @@ -958,7 +958,7 @@ pub enum ExternalMsg { /// /// Example: /// - /// - Lua: "Terminate" + /// - Lua: `"Terminate"` /// - YAML: `Terminate` Terminate, }