You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
xplr/docs/en/src/messages.md

1410 lines
28 KiB
Markdown

# Full List of Messages
2 years ago
xplr [messages][1] categorized based on their purpose.
## Categories
- [Exploring](#exploring)
- [Screen](#screen)
- [Navigation](#navigation)
- [Virtual Root](#virtual-root)
- [Reading Input](#reading-input)
- [Switching Mode](#switching-mode)
- [Switching Layout](#switching-layout)
- [Executing Commands](#executing-commands)
- [Calling Lua Functions](#calling-lua-functions)
- [Select Operations](#select-operations)
- [Filter Operations](#filter-operations)
- [Sort Operations](#sort-operations)
- [Search Operations](#search-operations)
- [Mouse Operations](#mouse-operations)
- [Fifo Operations](#fifo-operations)
- [Logging](#logging)
- [Debugging](#debugging)
- [Quit Options](#quit-options)
### Exploring
#### ExplorePwd
Explore the present working directory and register the filtered nodes.
This operation is expensive. So, try to avoid using it too often.
Example:
2 years ago
- Lua: `"ExplorePwd"`
- YAML: `ExplorePwd`
#### ExplorePwdAsync
Explore the present working directory and register the filtered nodes
asynchronously. This operation happens asynchronously. That means, the
xplr directory buffers won't be updated immediately. Hence, it needs to
be used with care and probably with special checks in place. To explore
$PWD synchronously, use `ExplorePwd` instead.
Example:
2 years ago
- Lua: `"ExplorePwdAsync"`
- YAML: `ExplorePwdAsync`
#### ExploreParentsAsync
Explore the present working directory along with its parents and
register the filtered nodes. This operation happens asynchronously.
That means, the xplr directory buffers won't be updated immediately.
Hence, it needs to be used with care and probably with special checks
in place. To explore just the `$PWD` synchronously, use `ExplorePwd`
instead.
Example:
2 years ago
- Lua: `"ExploreParentsAsync"`
- YAML: `ExploreParentsAsync`
### Screen
#### ClearScreen
Clear the screen.
Example:
2 years ago
- Lua: `"ClearScreen"`
- YAML: `ClearScreen`
#### Refresh
Refresh the screen.
But it will not re-explore the directory if the working directory is
the same. If there is some change in the working directory and you want
to re-explore it, use the `Explore` message instead.
Also, it will not clear the screen. Use `ClearScreen` for that.
Example:
2 years ago
- Lua: `"Refresh"`
- YAML: `Refresh`
### Navigation
#### FocusNext
Focus next node.
Example:
2 years ago
- Lua: `"FocusNext"`
- YAML: `FocusNext`
Release 0.21.0 (#602) * Add xplr.util.lscolor and xplr.util.paint (#569) * Add xplr.util.lscolor and xplr.util.style * Fix formatting * Fix clippy suggestions * Remove redundant closures * Optimize, support NO_COLOR, and rename style to paint * Use xplr.util.paint and xplr.util.color in init.lua Co-authored-by: Noah Mayr <dev@noahmayr.com> * Add utility function xplr.util.textwrap (#567) * Add utility function xplr.util.wrap * Cleanup and fix formatting * Update src/lua/util.rs Co-authored-by: Arijit Basu <sayanarijit@users.noreply.github.com> * Update wrap to return lines instead * Fix doc * Rename wrap -> text wrap Co-authored-by: Arijit Basu <sayanarijit@users.noreply.github.com> Co-authored-by: Arijit Basu <sayanarijit@gmail.com> * Add xplr.util.relative_to and xplr.util.path_shorthand (#568) * Add xplr.util.relative_to and xplr.util.path_shorthand * Remove duplicate slash at end * Use pwd from env and remove pathdiff package * Some fixes and improvements * Generate docs * Some more improvements * Improve selection rendering * Improve functions with test cases * Update docs * Minor doc fix * Rename path_shorthand -> shortened * Handle homedir edgecase Also fix init.lua * Minor fix * Use config argument for relative and shortened paths * Prefix relative paths with "." and fix edge cases where we're not showing the file name * Use and_then instead of map and flatten * WIP: Move selection rendering to lua * Make selection renderer function configurable on lua side * Some improvements * Some impovements * Minor doc fix * Remove symlink style --------- Co-authored-by: Arijit Basu <sayanarijit@gmail.com> * Add xplr.util.layout_replaced (#574) Closes: https://github.com/sayanarijit/xplr/issues/573 * Improve selection operations (#575) - `:sl` to list selection. - `:ss` to softlink. - `:sh` to hardlink. - Avoid conflict by adding suffix. - Unselect individual path only on operation success. Closes: - https://github.com/sayanarijit/xplr/issues/572 - https://github.com/sayanarijit/xplr/issues/571 - https://github.com/sayanarijit/xplr/issues/570 * Minor updates * Add more features (#581) * Add more features - Key binding ":se" to edit selection list in $EDITOR - New utility functions: - xplr.util.clone - xplr.util.exists - xplr.util.is_dir - xplr.util.is_file - xplr.util.is_symlink - xplr.util.is_absolute - xplr.util.path_split - xplr.util.node Closes: https://github.com/sayanarijit/xplr/issues/580 Closes: https://github.com/sayanarijit/xplr/issues/579 Closes: https://github.com/sayanarijit/xplr/issues/577 * Fix edit selection list * Fix clippy lints * Fix layout link in doc * xplr.util.shortened -> xplr.util.shorten * Fix more clippy lints * Fix xplr.util.shorten name change * More UI utilities and improvements (#582) * More UI utilities and improvements - Apply style only to the file column in the table. - Properly quote paths. - Expose the applicable style from config in the table renderer argument. - Add utility functions: - xplr.util.node_type - xplr.util.style_mix - xplr.util.shell_escape * Make escaping play nice with shorten * Fix tests * Fix doc * Some fixes * Fix selection editor * Fix clear selection for selection editor * Add selection navigation (#583) * Add selection navigation - FocusNextSelection (ctrl-n) - FocusPreviousSelection (ctrl-p) Also improve batch operations * Minor doc fixes * Minor doc fix * Remove tab -> ctrl-i binding * Improve batch operation interaction - More robust focus operation. - Focus on failed to delete paths. * Fix Rust compatibility * Fix panic on permission denial Also, improve the error messages. * More logging improvements * Fix layout_replace only working with table parameters (#586) * Improve builtin search mode (#585) * Improve builtin search mode * Remove commented out code * Make search ranking and algorithm more extensible * Flatten messages BREAKING: xplr.config.general.sort_and_filter_ui.search_identifier -> xplr.config.general.sort_and_filter_ui.search_identifiers Messages: - Search - SearchFromInput - SearchFuzzy - SearchFuzzyUnranked - SearchFuzzyUnrankedFromInput - SearchRegexUnrankedFromInput - SearchRegex - SearchRegexUnranked - SearchRegexUnrankedFromInput - SearchRegexUnrankedFromInput - CycleSearchAlgorithm - EnableRankedSearch - DisableRankedSearch - ToggleRankedSearch Static config: xplr.config.general.search.algorithm = "Fuzzy" * Handle search ranking in search algorithm * Make CycleSearchAlgorithm only cycle between algorithms, without changing ranking * Separate algorithm and ordering * Minor doc updates * Some cleanup * Final touch * Cycle -> Toggle --------- Co-authored-by: Arijit Basu <sayanarijit@gmail.com> * Fix layout replace for unit layouts (#588) * Allow custom title and ui config in custom layout. (#589) * Allow custom title and ui config in custom layout. Adds the following layouts: - Static - Dynamic Deprecates `CustomContent` (but won't be removed to maintain compatibility). Closes: https://github.com/sayanarijit/xplr/issues/563 * Delete init.lua * Update docs/en/src/layout.md * Update docs/en/src/layout.md * Rename - Paragraph => CustomParagraph - List => CustomList - Table => CustomTable Also update init.lua * Fix clippy errs * Fix doc links * Fix search order * Improve working with file permissions (#591) * Improve working with file permissions Implements: - xplr.util.permissions_rwx - xplr.util.permissions_octal * Edit permissions * Add permissions in Resolved Node (#592) * Add permissions in Relolved Node And handle application/x-executable mime type. * Fix bench * Improve permissions editor * More permissions editor improvements * Doc updates * Remove ResolvedNode.permissions (#593) Reason: Too much serialization making lua calls slow. * Add workaround for macos with legacy coreutils (#595) Refs: - https://github.com/sayanarijit/xplr/issues/594 - https://github.com/sayanarijit/xplr/issues/559 * Use H:M:S format to display logs (#596) * Keep the selection list and clear manually (#597) * Keep the selection list and clear manually Ref: https://github.com/sayanarijit/map.xplr/issues/4 * Fix linting err * Fix broken history (#599) * Fix broken hostory Fixes: https://github.com/sayanarijit/xplr/issues/598 * Minor cleanup * Slightly optimize selection retention (#600) * Update deps * chrono -> time * update: 0.20.2 -> 0.21.1 * Update post-install.md * Upgrade guide * Minor fix * Fix tests * Add missing doc * Fix clippy lints --------- Co-authored-by: Noah Mayr <dev@noahmayr.com>
1 year ago
#### FocusNextSelection
Focus on the next selected node.
Example:
- Lua: `"FocusNextSelection"`
- YAML: `FocusNextSelection`
#### FocusNextByRelativeIndex
Focus on the `n`th node relative to the current focus where `n` is a
given value.
Type: { FocusNextByRelativeIndex = int }
Example:
2 years ago
- Lua: `{ FocusNextByRelativeIndex = 2 }`
- YAML: `FocusNextByRelativeIndex: 2`
#### FocusNextByRelativeIndexFromInput
Focus on the `n`th node relative to the current focus where `n` is read
from the input buffer.
Example:
2 years ago
- Lua: `"FocusNextByRelativeIndexFromInput"`
- YAML: `FocusNextByRelativeIndexFromInput`
#### FocusPrevious
Focus on the previous item.
Example:
2 years ago
- Lua: `"FocusPrevious"`
- YAML: `FocusPrevious`
Release 0.21.0 (#602) * Add xplr.util.lscolor and xplr.util.paint (#569) * Add xplr.util.lscolor and xplr.util.style * Fix formatting * Fix clippy suggestions * Remove redundant closures * Optimize, support NO_COLOR, and rename style to paint * Use xplr.util.paint and xplr.util.color in init.lua Co-authored-by: Noah Mayr <dev@noahmayr.com> * Add utility function xplr.util.textwrap (#567) * Add utility function xplr.util.wrap * Cleanup and fix formatting * Update src/lua/util.rs Co-authored-by: Arijit Basu <sayanarijit@users.noreply.github.com> * Update wrap to return lines instead * Fix doc * Rename wrap -> text wrap Co-authored-by: Arijit Basu <sayanarijit@users.noreply.github.com> Co-authored-by: Arijit Basu <sayanarijit@gmail.com> * Add xplr.util.relative_to and xplr.util.path_shorthand (#568) * Add xplr.util.relative_to and xplr.util.path_shorthand * Remove duplicate slash at end * Use pwd from env and remove pathdiff package * Some fixes and improvements * Generate docs * Some more improvements * Improve selection rendering * Improve functions with test cases * Update docs * Minor doc fix * Rename path_shorthand -> shortened * Handle homedir edgecase Also fix init.lua * Minor fix * Use config argument for relative and shortened paths * Prefix relative paths with "." and fix edge cases where we're not showing the file name * Use and_then instead of map and flatten * WIP: Move selection rendering to lua * Make selection renderer function configurable on lua side * Some improvements * Some impovements * Minor doc fix * Remove symlink style --------- Co-authored-by: Arijit Basu <sayanarijit@gmail.com> * Add xplr.util.layout_replaced (#574) Closes: https://github.com/sayanarijit/xplr/issues/573 * Improve selection operations (#575) - `:sl` to list selection. - `:ss` to softlink. - `:sh` to hardlink. - Avoid conflict by adding suffix. - Unselect individual path only on operation success. Closes: - https://github.com/sayanarijit/xplr/issues/572 - https://github.com/sayanarijit/xplr/issues/571 - https://github.com/sayanarijit/xplr/issues/570 * Minor updates * Add more features (#581) * Add more features - Key binding ":se" to edit selection list in $EDITOR - New utility functions: - xplr.util.clone - xplr.util.exists - xplr.util.is_dir - xplr.util.is_file - xplr.util.is_symlink - xplr.util.is_absolute - xplr.util.path_split - xplr.util.node Closes: https://github.com/sayanarijit/xplr/issues/580 Closes: https://github.com/sayanarijit/xplr/issues/579 Closes: https://github.com/sayanarijit/xplr/issues/577 * Fix edit selection list * Fix clippy lints * Fix layout link in doc * xplr.util.shortened -> xplr.util.shorten * Fix more clippy lints * Fix xplr.util.shorten name change * More UI utilities and improvements (#582) * More UI utilities and improvements - Apply style only to the file column in the table. - Properly quote paths. - Expose the applicable style from config in the table renderer argument. - Add utility functions: - xplr.util.node_type - xplr.util.style_mix - xplr.util.shell_escape * Make escaping play nice with shorten * Fix tests * Fix doc * Some fixes * Fix selection editor * Fix clear selection for selection editor * Add selection navigation (#583) * Add selection navigation - FocusNextSelection (ctrl-n) - FocusPreviousSelection (ctrl-p) Also improve batch operations * Minor doc fixes * Minor doc fix * Remove tab -> ctrl-i binding * Improve batch operation interaction - More robust focus operation. - Focus on failed to delete paths. * Fix Rust compatibility * Fix panic on permission denial Also, improve the error messages. * More logging improvements * Fix layout_replace only working with table parameters (#586) * Improve builtin search mode (#585) * Improve builtin search mode * Remove commented out code * Make search ranking and algorithm more extensible * Flatten messages BREAKING: xplr.config.general.sort_and_filter_ui.search_identifier -> xplr.config.general.sort_and_filter_ui.search_identifiers Messages: - Search - SearchFromInput - SearchFuzzy - SearchFuzzyUnranked - SearchFuzzyUnrankedFromInput - SearchRegexUnrankedFromInput - SearchRegex - SearchRegexUnranked - SearchRegexUnrankedFromInput - SearchRegexUnrankedFromInput - CycleSearchAlgorithm - EnableRankedSearch - DisableRankedSearch - ToggleRankedSearch Static config: xplr.config.general.search.algorithm = "Fuzzy" * Handle search ranking in search algorithm * Make CycleSearchAlgorithm only cycle between algorithms, without changing ranking * Separate algorithm and ordering * Minor doc updates * Some cleanup * Final touch * Cycle -> Toggle --------- Co-authored-by: Arijit Basu <sayanarijit@gmail.com> * Fix layout replace for unit layouts (#588) * Allow custom title and ui config in custom layout. (#589) * Allow custom title and ui config in custom layout. Adds the following layouts: - Static - Dynamic Deprecates `CustomContent` (but won't be removed to maintain compatibility). Closes: https://github.com/sayanarijit/xplr/issues/563 * Delete init.lua * Update docs/en/src/layout.md * Update docs/en/src/layout.md * Rename - Paragraph => CustomParagraph - List => CustomList - Table => CustomTable Also update init.lua * Fix clippy errs * Fix doc links * Fix search order * Improve working with file permissions (#591) * Improve working with file permissions Implements: - xplr.util.permissions_rwx - xplr.util.permissions_octal * Edit permissions * Add permissions in Resolved Node (#592) * Add permissions in Relolved Node And handle application/x-executable mime type. * Fix bench * Improve permissions editor * More permissions editor improvements * Doc updates * Remove ResolvedNode.permissions (#593) Reason: Too much serialization making lua calls slow. * Add workaround for macos with legacy coreutils (#595) Refs: - https://github.com/sayanarijit/xplr/issues/594 - https://github.com/sayanarijit/xplr/issues/559 * Use H:M:S format to display logs (#596) * Keep the selection list and clear manually (#597) * Keep the selection list and clear manually Ref: https://github.com/sayanarijit/map.xplr/issues/4 * Fix linting err * Fix broken history (#599) * Fix broken hostory Fixes: https://github.com/sayanarijit/xplr/issues/598 * Minor cleanup * Slightly optimize selection retention (#600) * Update deps * chrono -> time * update: 0.20.2 -> 0.21.1 * Update post-install.md * Upgrade guide * Minor fix * Fix tests * Add missing doc * Fix clippy lints --------- Co-authored-by: Noah Mayr <dev@noahmayr.com>
1 year ago
#### FocusPreviousSelection
Focus on the previous selection item.
Example:
- Lua: `"FocusPreviousSelection"`
- YAML: `FocusPreviousSelection`
#### FocusPreviousByRelativeIndex
Focus on the `-n`th node relative to the current focus where `n` is a
given value.
Type: { FocusPreviousByRelativeIndex = int }
Example:
- Lua: `{ FocusPreviousByRelativeIndex = 2 }`
- YAML: `FocusPreviousByRelativeIndex: 2`
#### FocusPreviousByRelativeIndexFromInput
Focus on the `-n`th node relative to the current focus where `n` is
read from the input buffer.
Example:
2 years ago
- Lua: `"FocusPreviousByRelativeIndexFromInput"`
- YAML: `FocusPreviousByRelativeIndexFromInput`
#### FocusFirst
Focus on the first node.
Example:
2 years ago
- Lua: `"FocusFirst"`
- YAML: `FocusFirst`
#### FocusLast
Focus on the last node.
Example:
2 years ago
- Lua: `"FocusLast"`
- YAML: `FocusLast`
#### FocusPath
Focus on the given path.
Type: { FocusPath = "string" }
Example:
- Lua: `{ FocusPath = "/path/to/file" }`
- YAML: `FocusPath: /path/to/file`
#### FocusPathFromInput
Focus on the path read from input buffer.
Example:
2 years ago
- Lua: `"FocusPathFromInput"`
- YAML: `FocusPathFromInput`
#### FocusByIndex
Focus on the absolute `n`th node where `n` is a given value.
Type: { FocusByIndex = int }
Example:
2 years ago
- Lua: `{ FocusByIndex = 2 }`
- YAML: `FocusByIndex: 2`
#### FocusByIndexFromInput
Focus on the absolute `n`th node where `n` is read from the input buffer.
Example:
2 years ago
- Lua: `"FocusByIndexFromInput"`
- YAML: `FocusByIndexFromInput`
#### FocusByFileName
Focus on the file by name from the present working directory.
Type: { FocusByFileName = "string" }
Example:
2 years ago
- Lua: `{ FocusByFileName = "filename.ext" }`
- YAML: `FocusByFileName: filename.ext`
#### ScrollUp
Scroll up by terminal height.
Example:
- Lua: `"ScrollUp"`
- YAML: `ScrollUp`
#### ScrollDown
Scroll down by terminal height.
Example:
- Lua: `"ScrollDown"`
- YAML: `ScrollDown`
#### ScrollUpHalf
Scroll up by half of terminal height.
Example:
- Lua: `"ScrollUpHalf"`
- YAML: `ScrollUpHalf`
#### ScrollDownHalf
Scroll down by half of terminal height.
Example:
- Lua: `"ScrollDownHalf"`
- YAML: `ScrollDownHalf`
#### ChangeDirectory
Change the present working directory ($PWD)
Type: { ChangeDirectory = "string" }
Example:
2 years ago
- Lua: `{ ChangeDirectory = "/path/to/directory" }`
- YAML: `ChangeDirectory: /path/to/directory`
#### Enter
Enter into the currently focused path if it's a directory.
Example:
2 years ago
- Lua: `"Enter"`
- YAML: `Enter`
#### Back
Go back to the parent directory.
Example:
2 years ago
- Lua: `"Back"`
- YAML: `Back`
#### LastVisitedPath
Go to the last path visited.
Example:
2 years ago
- Lua: `"LastVisitedPath"`
- YAML: `LastVisitedPath`
#### NextVisitedPath
Go to the next path visited.
Example:
2 years ago
- Lua: `"NextVisitedPath"`
- YAML: `NextVisitedPath`
#### FollowSymlink
Follow the symlink under focus to its actual location.
Example:
2 years ago
- Lua: `"FollowSymlink"`
- YAML: `FollowSymlink`
### Virtual Root
#### SetVroot
Sets the virtual root for isolating xplr navigation, similar to
`--vroot`, but temporary (can be reset back to initial value).
If the $PWD is outside the vroot, xplr will automatically enter vroot.
Type: { SetVroot = "string" }
Example:
2 years ago
- Lua: `{ SetVroot = "/tmp" }`
- YAML: `SetVroot: /tmp`
#### UnsetVroot
Unset the virtual root temporarily (can be reset back to the initial
value).
Example:
- Lua: `"UnsetVroot"`
- YAML: `UnsetVroot`
#### ToggleVroot
Toggle virtual root between unset, initial value and $PWD.
Example:
- Lua: `"ToggleVroot"`
- YAML: `ToggleVroot`
#### ResetVroot
Reset the virtual root back to the initial value.
Example:
- Lua: `"ResetVroot"`
- YAML: `ResetVroot`
### Reading Input
#### SetInputPrompt
Set the input prompt temporarily, until the input buffer is reset.
Type: { SetInputPrompt = string }
Example:
- Lua: `{ SetInputPrompt = "→" }`
- YAML: `SetInputPrompt: →`
#### UpdateInputBuffer
Update the input buffer using cursor based operations.
Type: { UpdateInputBuffer = [Input Opertaion](https://xplr.dev/en/input-operation) }
Example:
2 years ago
- Lua: `{ UpdateInputBuffer = "GoToPreviousWord" }`
- YAML: `UpdateInputBuffer: GoToPreviousWord`
#### UpdateInputBufferFromKey
Update the input buffer from the key read from keyboard input.
Example:
2 years ago
- Lua: `"UpdateInputBufferFromKey"`
- YAML: `UpdateInputBufferFromKey`
#### BufferInput
Append/buffer the given string into the input buffer.
Type: { BufferInput = "string" }
Example:
2 years ago
- Lua: `{ BufferInput = "foo" }`
- YAML: `BufferInput: foo`
#### BufferInputFromKey
Append/buffer the characted read from a keyboard input into the
input buffer.
Example:
2 years ago
- Lua: `"BufferInputFromKey"`
- YAML: `BufferInputFromKey`
#### SetInputBuffer
Set/rewrite the input buffer with the given string.
When the input buffer is not-null (even if empty string)
it will show in the UI.
Type: { SetInputBuffer = "string" }
Example:
2 years ago
- Lua: `{ SetInputBuffer = "foo" }`
- YAML: `SetInputBuffer: foo`
#### RemoveInputBufferLastCharacter
Remove input buffer's last character.
Example:
2 years ago
- Lua: `"RemoveInputBufferLastCharacter"`
- YAML: `RemoveInputBufferLastCharacter`
#### RemoveInputBufferLastWord
Remove input buffer's last word.
Example:
2 years ago
- Lua: `"RemoveInputBufferLastWord"`
- YAML: `RemoveInputBufferLastWord`
#### ResetInputBuffer
Reset the input buffer back to null. It will not show in the UI.
Example:
2 years ago
- Lua: `"ResetInputBuffer"`
- YAML: `ResetInputBuffer`
### Switching Mode
#### SwitchMode
Switch input [mode](https://xplr.dev/en/modes).
Type : { SwitchMode = "string" }
Example:
2 years ago
- Lua: `{ SwitchMode = "default" }`
- YAML: SwitchMode: default
> **NOTE:** To be specific about which mode to switch to, use
2 years ago
> `SwitchModeBuiltin` or `SwitchModeCustom` instead.
#### SwitchModeKeepingInputBuffer
Switch input [mode](https://xplr.dev/en/modes).
It keeps the input buffer.
Type: { SwitchModeKeepingInputBuffer = "string" }
Example:
2 years ago
- Lua: `{ SwitchModeKeepingInputBuffer = "default" }`
- YAML: `SwitchModeKeepingInputBuffer: default`
> **NOTE:** To be specific about which mode to switch to, use
> `SwitchModeBuiltinKeepingInputBuffer` or
> `SwitchModeCustomKeepingInputBuffer` instead.
#### SwitchModeBuiltin
Switch to a [builtin mode](https://xplr.dev/en/modes#builtin).
It clears the input buffer.
Type: { SwitchModeBuiltin = "string" }
Example:
2 years ago
- Lua: `{ SwitchModeBuiltin = "default" }`
- YAML: `SwitchModeBuiltin: default`
#### SwitchModeBuiltinKeepingInputBuffer
Switch to a [builtin mode](https://xplr.dev/en/modes#builtin).
It keeps the input buffer.
Type: { SwitchModeBuiltinKeepingInputBuffer = "string" }
Example:
2 years ago
- Lua: `{ SwitchModeBuiltinKeepingInputBuffer = "default" }`
- YAML: `SwitchModeBuiltinKeepingInputBuffer: default`
#### SwitchModeCustom
Switch to a [custom mode](https://xplr.dev/en/modes#custom).
It clears the input buffer.
Type: { SwitchModeCustom = "string" }
Example:
2 years ago
- Lua: `{ SwitchModeCustom = "my_custom_mode" }`
- YAML: `SwitchModeCustom: my_custom_mode`
#### SwitchModeCustomKeepingInputBuffer
Switch to a [custom mode](https://xplr.dev/en/modes#custom).
It keeps the input buffer.
Type: { SwitchModeCustomKeepingInputBuffer = "string" }
Example:
2 years ago
- Lua: `{ SwitchModeCustomKeepingInputBuffer = "my_custom_mode" }`
- YAML: `SwitchModeCustomKeepingInputBuffer: my_custom_mode`
#### PopMode
Pop the last mode from the history and switch to it.
It clears the input buffer.
Example:
2 years ago
- Lua: `"PopMode"`
- YAML: `PopMode`
#### PopModeKeepingInputBuffer
Pop the last mode from the history and switch to it.
It keeps the input buffer.
Example:
2 years ago
- Lua: `PopModeKeepingInputBuffer`
- YAML: `PopModeKeepingInputBuffer`
### Switching Layout
#### SwitchLayout
Switch [layout](https://xplr.dev/en/layouts).
Type: { SwitchLayout = "string" }
Example:
2 years ago
- Lua: `{ SwitchLayout = "default" }`
- YAML: `SwitchLayout: default`
> **NOTE:** To be specific about which layout to switch to, use `SwitchLayoutBuiltin` or
> `SwitchLayoutCustom` instead.
#### SwitchLayoutBuiltin
Switch to a [builtin layout](https://xplr.dev/en/layouts#builtin).
Type: { SwitchLayoutBuiltin = "string" }
Example:
2 years ago
- Lua: `{ SwitchLayoutBuiltin = "default" }`
- YAML: `SwitchLayoutBuiltin: default`
#### SwitchLayoutCustom
Switch to a [custom layout](https://xplr.dev/en/layouts#custom).
Type: { SwitchLayoutCustom = "string" }
Example:
2 years ago
- Lua: `{ SwitchLayoutCustom = "my_custom_layout" }`
- YAML: `SwitchLayoutCustom: my_custom_layout`
### Executing Commands
#### Call
2 years ago
Like `Call0`, but it uses `\n` as the delimiter in input/output pipes,
hence it cannot handle files with `\n` in the name.
You may want to use `Call0` instead.
#### Call0
Call a shell command with the given arguments.
Note that the arguments will be shell-escaped.
So to read the variables, the `-c` option of the shell
can be used.
2 years ago
You may need to pass `ExplorePwd` depending on the expectation.
2 years ago
Type: { Call0 = { command = "string", args = { "list", "of", "string" } }
Example:
2 years ago
- Lua: `{ Call0 = { command = "bash", args = { "-c", "read -p test" } } }`
- YAML: `Call0: { command: bash, args: ["-c", "read -p test"] }`
#### CallSilently
2 years ago
Like `CallSilently0`, but it uses `\n` as the delimiter in input/output
pipes, hence it cannot handle files with `\n` in the name.
You may want to use `CallSilently0` instead.
2 years ago
#### CallSilently0
Like `Call0` but without the flicker. The stdin, stdout
stderr will be piped to null. So it's non-interactive.
2 years ago
Type: { CallSilently0 = { command = "string", args = {"list", "of", "string"} } }
Example:
2 years ago
- Lua: `{ CallSilently0 = { command = "tput", args = { "bell" } } }`
- YAML: `CallSilently0: { command: tput, args: ["bell"] }`
#### BashExec
2 years ago
Like `BashExec0`, but it uses `\n` as the delimiter in input/output
pipes, hence it cannot handle files with `\n` in the name.
You may want to use `BashExec0` instead.
#### BashExec0
An alias to `Call: {command: bash, args: ["-c", "{string}"], silent: false}`
where `{string}` is the given value.
2 years ago
Type: { BashExec0 = "string" }
Example:
2 years ago
- Lua: `{ BashExec0 = "read -p test" }`
- YAML: `BashExec0: "read -p test"`
#### BashExecSilently
2 years ago
Like `BashExecSilently0`, but it uses `\n` as the delimiter in
input/output pipes, hence it cannot handle files with `\n` in the name.
You may want to use `BashExecSilently0` instead.
2 years ago
#### BashExecSilently0
Like `BashExec0` but without the flicker. The stdin, stdout
stderr will be piped to null. So it's non-interactive.
Type: { BashExecSilently0 = "string" }
Example:
2 years ago
- Lua: `{ BashExecSilently0 = "tput bell" }`
- YAML: `BashExecSilently0: "tput bell"`
### Calling Lua Functions
#### CallLua
Call a Lua function.
A [Lua Context](https://xplr.dev/en/lua-function-calls#lua-context)
object will be passed to the function as argument.
The function can optionally return a list of messages for xplr to
handle after the executing the function.
Type: { CallLua = "string" }
Example:
2 years ago
- Lua: `{ CallLua = "custom.some_custom_funtion" }`
- YAML: `CallLua: custom.some_custom_funtion`
#### CallLuaSilently
Like `CallLua` but without the flicker. The stdin, stdout
stderr will be piped to null. So it's non-interactive.
Type: { CallLuaSilently = "string" }
Example:
2 years ago
- Lua: `{ CallLuaSilently = "custom.some_custom_function" }`
- YAML: `CallLuaSilently: custom.some_custom_function`
#### LuaEval
Execute Lua code without needing to define a function.
If the `string` is a callable, xplr will try to call it with with the
[Lua Context](https://xplr.dev/en/lua-function-calls#lua-context)
argument.
Type: { LuaEval = "string" }
Example:
2 years ago
- 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"`
#### LuaEvalSilently
Like `LuaEval` but without the flicker. The stdin, stdout
stderr will be piped to null. So it's non-interactive.
Type: { LuaEvalSilently = "string" }
Example:
2 years ago
- Lua: `{ LuaEvalSilently = [[return { { LogInfo = "foo" } }]] }`
- YAML: `LuaEvalSilently: "return { { LogInfo = 'foo' } }"`
### Select Operations
#### Select
Select the focused node.
Example:
2 years ago
- Lua: `"Select"`
- YAML: `Select`
#### SelectAll
Select all the visible nodes.
Example:
2 years ago
- Lua: `"SelectAll"`
- YAML: `SelectAll`
#### SelectPath
Select the given path.
Type: { SelectPath = "string" }
Example:
2 years ago
- Lua: `{ SelectPath = "/path/to/file" }`
- YAML: `SelectPath: /path/to/file`
#### UnSelect
Unselect the focused node.
Example:
2 years ago
- Lua: `"UnSelect"`
- YAML: `UnSelect`
#### UnSelectAll
Unselect all the visible nodes.
Example:
2 years ago
- Lua: `"UnSelectAll"`
- YAML: `UnSelectAll`
#### UnSelectPath
UnSelect the given path.
Type: { UnSelectPath = "string)" }
Example:
2 years ago
- Lua: `{ UnSelectPath = "/path/to/file" }`
- YAML: `UnSelectPath: /path/to/file`
#### ToggleSelection
Toggle selection on the focused node.
Example:
2 years ago
- Lua: `"ToggleSelection"`
- YAML `ToggleSelection`
#### ToggleSelectAll
Toggle between select all and unselect all.
Example:
2 years ago
- Lua: `"ToggleSelectAll"`
- YAML: `ToggleSelectAll`
#### ToggleSelectionByPath
Toggle selection by file path.
Type: { ToggleSelectionByPath = "string" }
Example:
2 years ago
- Lua: `{ ToggleSelectionByPath = "/path/to/file" }`
- YAML: `ToggleSelectionByPath: /path/to/file`
#### ClearSelection
Clear the selection.
Example:
2 years ago
- Lua: `"ClearSelection"`
- YAML: `ClearSelection`
### Filter Operations
#### AddNodeFilter
Add a [filter](https://xplr.dev/en/filtering#filter) to exclude nodes
while exploring directories.
You need to call `ExplorePwd` or `ExplorePwdAsync` explicitely.
Filters get automatically cleared when changing directories.
Type: { AddNodeFilter = { filter = [Filter](https://xplr.dev/en/filtering#filter), input = "string" }
Example:
2 years ago
- Lua: `{ AddNodeFilter = { filter = "RelativePathDoesStartWith", input = "foo" } }`
- YAML: `AddNodeFilter: { filter: RelativePathDoesStartWith, input: foo }`
#### RemoveNodeFilter
Remove an existing [filter](https://xplr.dev/en/filtering#filter).
You need to call `ExplorePwd` or `ExplorePwdAsync` explicitely.
Type: { RemoveNodeFilter = { filter = [Filter](https://xplr.dev/en/filtering), input = "string" }
Example:
2 years ago
- Lua: `{ RemoveNodeFilter: { filter: "RelativePathDoesStartWith", input: "foo" } }`
- YAML: `RemoveNodeFilter: { filter: RelativePathDoesStartWith, input: foo }`
#### ToggleNodeFilter
Remove a [filter](https://xplr.dev/en/filtering#filter) if it exists,
else, add a it.
You need to call `ExplorePwd` or `ExplorePwdAsync` explicitely.
Type: { ToggleNodeFilter = { filter = [Filter](https://xplr.dev/en/filtering), input = "string" }
Example:
2 years ago
- Lua: `{ ToggleNodeFilter = { filter = "RelativePathDoesStartWith", input = "foo" } }`
- YAML: `ToggleNodeFilter: { filter: RelativePathDoesStartWith, input: foo }`
#### AddNodeFilterFromInput
Add a node [filter](https://xplr.dev/en/filtering#filter) reading the
input from the buffer.
You need to call `ExplorePwd` or `ExplorePwdAsync` explicitely.
Type: { AddNodeFilterFromInput = [Filter](https://xplr.dev/en/filtering) }
Example:
2 years ago
- Lua: `{ AddNodeFilterFromInput = "RelativePathDoesStartWith" }`
- YAML: `AddNodeFilterFromInput: RelativePathDoesStartWith`
#### RemoveNodeFilterFromInput
Remove a node [filter](https://xplr.dev/en/filtering#filter) reading
the input from the buffer.
You need to call `ExplorePwd` or `ExplorePwdAsync` explicitely.
Type: { RemoveNodeFilterFromInput = [Filter](https://xplr.dev/en/filtering) }
Example:
2 years ago
- Lua: `{ RemoveNodeFilterFromInput = "RelativePathDoesStartWith" }`
- YAML: `RemoveNodeFilterFromInput: RelativePathDoesStartWith`
#### RemoveLastNodeFilter
Remove the last node [filter](https://xplr.dev/en/filtering).
You need to call `ExplorePwd` or `ExplorePwdAsync` explicitely.
Example:
2 years ago
- Lua: `"RemoveLastNodeFilter"`
- YAML: `RemoveLastNodeFilter`
#### ResetNodeFilters
Reset the node [filters](https://xplr.dev/en/filtering) back to the
default configuration.
You need to call `ExplorePwd` or `ExplorePwdAsync` explicitely.
Example:
2 years ago
- Lua: `"ResetNodeFilters"`
- YAML: `ResetNodeFilters`
#### ClearNodeFilters
Clear all the node [filters](https://xplr.dev/en/filtering).
You need to call `ExplorePwd` or `ExplorePwdAsync` explicitely.
Example:
2 years ago
- Lua: `"ClearNodeFilters"`
- YAML: `ClearNodeFilters`
### Sort Operations
#### AddNodeSorter
Add a [sorter](https://xplr.dev/en/sorting#sorter) to sort nodes while
exploring directories.
You need to call `ExplorePwd` or `ExplorePwdAsync` explicitely.
Type: { AddNodeSorter = { sorter = [Sorter](https://xplr.dev/en/sorting#sorter), reverse = bool } }
Example:
2 years ago
- Lua: `{ AddNodeSorter = { sorter = "ByRelativePath", reverse = false } }`
- YAML: `AddNodeSorter: { sorter: ByRelativePath, reverse: false }`
#### RemoveNodeSorter
Remove an existing [sorter](https://xplr.dev/en/sorting#sorter).
You need to call `ExplorePwd` or `ExplorePwdAsync` explicitely.
Type: { RemoveNodeSorter = [Sorter](https://xplr.dev/en/sorting#sorter) }
Example:
2 years ago
- Lua: `{ RemoveNodeSorter = "ByRelativePath" }`
- YAML: `RemoveNodeSorter: ByRelativePath`
#### ReverseNodeSorter
Reverse a node [sorter](https://xplr.dev/en/sorting#sorter).
You need to call `ExplorePwd` or `ExplorePwdAsync` explicitely.
Type: { ReverseNodeSorter = [Sorter](https://xplr.dev/en/sorting#sorter) }
Example:
2 years ago
- Lua: `{ ReverseNodeSorter = "ByRelativePath" }`
- YAML: `ReverseNodeSorter: ByRelativePath`
#### ToggleNodeSorter
Remove a [sorter](https://xplr.dev/en/sorting#sorter) if it exists,
else, add a it.
You need to call `ExplorePwd` or `ExplorePwdAsync` explicitely.
Type: { ToggleNodeSorter = { sorter = [Sorter](https://xplr.dev/en/sorting#sorter), reverse = bool } }
Example:
2 years ago
- Lua: `{ ToggleSorterSorter: { sorter = "ByRelativePath", reverse = false } }`
- YAML: `ToggleSorterSorter: {sorter: ByRelativePath, reverse: false }`
#### ReverseNodeSorters
Reverse the node [sorters](https://xplr.dev/en/sorting#sorter).
You need to call `ExplorePwd` or `ExplorePwdAsync` explicitely.
Example:
2 years ago
- Lua: `"ReverseNodeSorters"`
- YAML: `ReverseNodeSorters`
#### RemoveLastNodeSorter
Remove the last node [sorter](https://xplr.dev/en/sorting#sorter).
You need to call `ExplorePwd` or `ExplorePwdAsync` explicitely.
Example:
2 years ago
- Lua: `"RemoveLastNodeSorter"`
- YAML: `RemoveLastNodeSorter`
#### ResetNodeSorters
Reset the node [sorters](https://xplr.dev/en/sorting#sorter) back to
the default configuration.
You need to call `ExplorePwd` or `ExplorePwdAsync` explicitely.
Example:
2 years ago
- Lua: `"ResetNodeSorters"`
- YAML: `ResetNodeSorters`
#### ClearNodeSorters
Clear all the node [sorters](https://xplr.dev/en/sorting#sorter).
You need to call `ExplorePwd` or `ExplorePwdAsync` explicitely.
Example:
2 years ago
- Lua: `"ClearNodeSorters"`
- YAML: `ClearNodeSorters`
### Search Operations
Release 0.21.0 (#602) * Add xplr.util.lscolor and xplr.util.paint (#569) * Add xplr.util.lscolor and xplr.util.style * Fix formatting * Fix clippy suggestions * Remove redundant closures * Optimize, support NO_COLOR, and rename style to paint * Use xplr.util.paint and xplr.util.color in init.lua Co-authored-by: Noah Mayr <dev@noahmayr.com> * Add utility function xplr.util.textwrap (#567) * Add utility function xplr.util.wrap * Cleanup and fix formatting * Update src/lua/util.rs Co-authored-by: Arijit Basu <sayanarijit@users.noreply.github.com> * Update wrap to return lines instead * Fix doc * Rename wrap -> text wrap Co-authored-by: Arijit Basu <sayanarijit@users.noreply.github.com> Co-authored-by: Arijit Basu <sayanarijit@gmail.com> * Add xplr.util.relative_to and xplr.util.path_shorthand (#568) * Add xplr.util.relative_to and xplr.util.path_shorthand * Remove duplicate slash at end * Use pwd from env and remove pathdiff package * Some fixes and improvements * Generate docs * Some more improvements * Improve selection rendering * Improve functions with test cases * Update docs * Minor doc fix * Rename path_shorthand -> shortened * Handle homedir edgecase Also fix init.lua * Minor fix * Use config argument for relative and shortened paths * Prefix relative paths with "." and fix edge cases where we're not showing the file name * Use and_then instead of map and flatten * WIP: Move selection rendering to lua * Make selection renderer function configurable on lua side * Some improvements * Some impovements * Minor doc fix * Remove symlink style --------- Co-authored-by: Arijit Basu <sayanarijit@gmail.com> * Add xplr.util.layout_replaced (#574) Closes: https://github.com/sayanarijit/xplr/issues/573 * Improve selection operations (#575) - `:sl` to list selection. - `:ss` to softlink. - `:sh` to hardlink. - Avoid conflict by adding suffix. - Unselect individual path only on operation success. Closes: - https://github.com/sayanarijit/xplr/issues/572 - https://github.com/sayanarijit/xplr/issues/571 - https://github.com/sayanarijit/xplr/issues/570 * Minor updates * Add more features (#581) * Add more features - Key binding ":se" to edit selection list in $EDITOR - New utility functions: - xplr.util.clone - xplr.util.exists - xplr.util.is_dir - xplr.util.is_file - xplr.util.is_symlink - xplr.util.is_absolute - xplr.util.path_split - xplr.util.node Closes: https://github.com/sayanarijit/xplr/issues/580 Closes: https://github.com/sayanarijit/xplr/issues/579 Closes: https://github.com/sayanarijit/xplr/issues/577 * Fix edit selection list * Fix clippy lints * Fix layout link in doc * xplr.util.shortened -> xplr.util.shorten * Fix more clippy lints * Fix xplr.util.shorten name change * More UI utilities and improvements (#582) * More UI utilities and improvements - Apply style only to the file column in the table. - Properly quote paths. - Expose the applicable style from config in the table renderer argument. - Add utility functions: - xplr.util.node_type - xplr.util.style_mix - xplr.util.shell_escape * Make escaping play nice with shorten * Fix tests * Fix doc * Some fixes * Fix selection editor * Fix clear selection for selection editor * Add selection navigation (#583) * Add selection navigation - FocusNextSelection (ctrl-n) - FocusPreviousSelection (ctrl-p) Also improve batch operations * Minor doc fixes * Minor doc fix * Remove tab -> ctrl-i binding * Improve batch operation interaction - More robust focus operation. - Focus on failed to delete paths. * Fix Rust compatibility * Fix panic on permission denial Also, improve the error messages. * More logging improvements * Fix layout_replace only working with table parameters (#586) * Improve builtin search mode (#585) * Improve builtin search mode * Remove commented out code * Make search ranking and algorithm more extensible * Flatten messages BREAKING: xplr.config.general.sort_and_filter_ui.search_identifier -> xplr.config.general.sort_and_filter_ui.search_identifiers Messages: - Search - SearchFromInput - SearchFuzzy - SearchFuzzyUnranked - SearchFuzzyUnrankedFromInput - SearchRegexUnrankedFromInput - SearchRegex - SearchRegexUnranked - SearchRegexUnrankedFromInput - SearchRegexUnrankedFromInput - CycleSearchAlgorithm - EnableRankedSearch - DisableRankedSearch - ToggleRankedSearch Static config: xplr.config.general.search.algorithm = "Fuzzy" * Handle search ranking in search algorithm * Make CycleSearchAlgorithm only cycle between algorithms, without changing ranking * Separate algorithm and ordering * Minor doc updates * Some cleanup * Final touch * Cycle -> Toggle --------- Co-authored-by: Arijit Basu <sayanarijit@gmail.com> * Fix layout replace for unit layouts (#588) * Allow custom title and ui config in custom layout. (#589) * Allow custom title and ui config in custom layout. Adds the following layouts: - Static - Dynamic Deprecates `CustomContent` (but won't be removed to maintain compatibility). Closes: https://github.com/sayanarijit/xplr/issues/563 * Delete init.lua * Update docs/en/src/layout.md * Update docs/en/src/layout.md * Rename - Paragraph => CustomParagraph - List => CustomList - Table => CustomTable Also update init.lua * Fix clippy errs * Fix doc links * Fix search order * Improve working with file permissions (#591) * Improve working with file permissions Implements: - xplr.util.permissions_rwx - xplr.util.permissions_octal * Edit permissions * Add permissions in Resolved Node (#592) * Add permissions in Relolved Node And handle application/x-executable mime type. * Fix bench * Improve permissions editor * More permissions editor improvements * Doc updates * Remove ResolvedNode.permissions (#593) Reason: Too much serialization making lua calls slow. * Add workaround for macos with legacy coreutils (#595) Refs: - https://github.com/sayanarijit/xplr/issues/594 - https://github.com/sayanarijit/xplr/issues/559 * Use H:M:S format to display logs (#596) * Keep the selection list and clear manually (#597) * Keep the selection list and clear manually Ref: https://github.com/sayanarijit/map.xplr/issues/4 * Fix linting err * Fix broken history (#599) * Fix broken hostory Fixes: https://github.com/sayanarijit/xplr/issues/598 * Minor cleanup * Slightly optimize selection retention (#600) * Update deps * chrono -> time * update: 0.20.2 -> 0.21.1 * Update post-install.md * Upgrade guide * Minor fix * Fix tests * Add missing doc * Fix clippy lints --------- Co-authored-by: Noah Mayr <dev@noahmayr.com>
1 year ago
#### Search
Search files using the current or default (fuzzy) search algorithm.
You need to call `ExplorePwd` or `ExplorePwdAsync` explicitely.
It gets reset automatically when changing directory.
Type: { Search = "string" }
Example:
- Lua: `{ Search = "pattern" }`
- YAML: `Search: pattern`
#### SearchFromInput
Calls `Search` with the input taken from the input buffer.
Example:
- Lua: `"SearchFromInput"`
- YAML: `SearchFromInput`
#### SearchFuzzy
Search files using fuzzy match algorithm.
It keeps the filters, but overrides the sorters.
You need to call `ExplorePwd` or `ExplorePwdAsync` explicitely.
It gets reset automatically when changing directory.
Type: { SearchFuzzy = "string" }
Example:
- Lua: `{ SearchFuzzy = "pattern" }`
- YAML: `SearchFuzzy: pattern`
#### SearchFuzzyFromInput
Calls `SearchFuzzy` with the input taken from the input buffer.
You need to call `ExplorePwd` or `ExplorePwdAsync` explicitely.
Release 0.21.0 (#602) * Add xplr.util.lscolor and xplr.util.paint (#569) * Add xplr.util.lscolor and xplr.util.style * Fix formatting * Fix clippy suggestions * Remove redundant closures * Optimize, support NO_COLOR, and rename style to paint * Use xplr.util.paint and xplr.util.color in init.lua Co-authored-by: Noah Mayr <dev@noahmayr.com> * Add utility function xplr.util.textwrap (#567) * Add utility function xplr.util.wrap * Cleanup and fix formatting * Update src/lua/util.rs Co-authored-by: Arijit Basu <sayanarijit@users.noreply.github.com> * Update wrap to return lines instead * Fix doc * Rename wrap -> text wrap Co-authored-by: Arijit Basu <sayanarijit@users.noreply.github.com> Co-authored-by: Arijit Basu <sayanarijit@gmail.com> * Add xplr.util.relative_to and xplr.util.path_shorthand (#568) * Add xplr.util.relative_to and xplr.util.path_shorthand * Remove duplicate slash at end * Use pwd from env and remove pathdiff package * Some fixes and improvements * Generate docs * Some more improvements * Improve selection rendering * Improve functions with test cases * Update docs * Minor doc fix * Rename path_shorthand -> shortened * Handle homedir edgecase Also fix init.lua * Minor fix * Use config argument for relative and shortened paths * Prefix relative paths with "." and fix edge cases where we're not showing the file name * Use and_then instead of map and flatten * WIP: Move selection rendering to lua * Make selection renderer function configurable on lua side * Some improvements * Some impovements * Minor doc fix * Remove symlink style --------- Co-authored-by: Arijit Basu <sayanarijit@gmail.com> * Add xplr.util.layout_replaced (#574) Closes: https://github.com/sayanarijit/xplr/issues/573 * Improve selection operations (#575) - `:sl` to list selection. - `:ss` to softlink. - `:sh` to hardlink. - Avoid conflict by adding suffix. - Unselect individual path only on operation success. Closes: - https://github.com/sayanarijit/xplr/issues/572 - https://github.com/sayanarijit/xplr/issues/571 - https://github.com/sayanarijit/xplr/issues/570 * Minor updates * Add more features (#581) * Add more features - Key binding ":se" to edit selection list in $EDITOR - New utility functions: - xplr.util.clone - xplr.util.exists - xplr.util.is_dir - xplr.util.is_file - xplr.util.is_symlink - xplr.util.is_absolute - xplr.util.path_split - xplr.util.node Closes: https://github.com/sayanarijit/xplr/issues/580 Closes: https://github.com/sayanarijit/xplr/issues/579 Closes: https://github.com/sayanarijit/xplr/issues/577 * Fix edit selection list * Fix clippy lints * Fix layout link in doc * xplr.util.shortened -> xplr.util.shorten * Fix more clippy lints * Fix xplr.util.shorten name change * More UI utilities and improvements (#582) * More UI utilities and improvements - Apply style only to the file column in the table. - Properly quote paths. - Expose the applicable style from config in the table renderer argument. - Add utility functions: - xplr.util.node_type - xplr.util.style_mix - xplr.util.shell_escape * Make escaping play nice with shorten * Fix tests * Fix doc * Some fixes * Fix selection editor * Fix clear selection for selection editor * Add selection navigation (#583) * Add selection navigation - FocusNextSelection (ctrl-n) - FocusPreviousSelection (ctrl-p) Also improve batch operations * Minor doc fixes * Minor doc fix * Remove tab -> ctrl-i binding * Improve batch operation interaction - More robust focus operation. - Focus on failed to delete paths. * Fix Rust compatibility * Fix panic on permission denial Also, improve the error messages. * More logging improvements * Fix layout_replace only working with table parameters (#586) * Improve builtin search mode (#585) * Improve builtin search mode * Remove commented out code * Make search ranking and algorithm more extensible * Flatten messages BREAKING: xplr.config.general.sort_and_filter_ui.search_identifier -> xplr.config.general.sort_and_filter_ui.search_identifiers Messages: - Search - SearchFromInput - SearchFuzzy - SearchFuzzyUnranked - SearchFuzzyUnrankedFromInput - SearchRegexUnrankedFromInput - SearchRegex - SearchRegexUnranked - SearchRegexUnrankedFromInput - SearchRegexUnrankedFromInput - CycleSearchAlgorithm - EnableRankedSearch - DisableRankedSearch - ToggleRankedSearch Static config: xplr.config.general.search.algorithm = "Fuzzy" * Handle search ranking in search algorithm * Make CycleSearchAlgorithm only cycle between algorithms, without changing ranking * Separate algorithm and ordering * Minor doc updates * Some cleanup * Final touch * Cycle -> Toggle --------- Co-authored-by: Arijit Basu <sayanarijit@gmail.com> * Fix layout replace for unit layouts (#588) * Allow custom title and ui config in custom layout. (#589) * Allow custom title and ui config in custom layout. Adds the following layouts: - Static - Dynamic Deprecates `CustomContent` (but won't be removed to maintain compatibility). Closes: https://github.com/sayanarijit/xplr/issues/563 * Delete init.lua * Update docs/en/src/layout.md * Update docs/en/src/layout.md * Rename - Paragraph => CustomParagraph - List => CustomList - Table => CustomTable Also update init.lua * Fix clippy errs * Fix doc links * Fix search order * Improve working with file permissions (#591) * Improve working with file permissions Implements: - xplr.util.permissions_rwx - xplr.util.permissions_octal * Edit permissions * Add permissions in Resolved Node (#592) * Add permissions in Relolved Node And handle application/x-executable mime type. * Fix bench * Improve permissions editor * More permissions editor improvements * Doc updates * Remove ResolvedNode.permissions (#593) Reason: Too much serialization making lua calls slow. * Add workaround for macos with legacy coreutils (#595) Refs: - https://github.com/sayanarijit/xplr/issues/594 - https://github.com/sayanarijit/xplr/issues/559 * Use H:M:S format to display logs (#596) * Keep the selection list and clear manually (#597) * Keep the selection list and clear manually Ref: https://github.com/sayanarijit/map.xplr/issues/4 * Fix linting err * Fix broken history (#599) * Fix broken hostory Fixes: https://github.com/sayanarijit/xplr/issues/598 * Minor cleanup * Slightly optimize selection retention (#600) * Update deps * chrono -> time * update: 0.20.2 -> 0.21.1 * Update post-install.md * Upgrade guide * Minor fix * Fix tests * Add missing doc * Fix clippy lints --------- Co-authored-by: Noah Mayr <dev@noahmayr.com>
1 year ago
It gets reset automatically when changing directory.
Example:
- Lua: `"SearchFuzzyFromInput"`
- YAML: `SearchFuzzyFromInput`
Release 0.21.0 (#602) * Add xplr.util.lscolor and xplr.util.paint (#569) * Add xplr.util.lscolor and xplr.util.style * Fix formatting * Fix clippy suggestions * Remove redundant closures * Optimize, support NO_COLOR, and rename style to paint * Use xplr.util.paint and xplr.util.color in init.lua Co-authored-by: Noah Mayr <dev@noahmayr.com> * Add utility function xplr.util.textwrap (#567) * Add utility function xplr.util.wrap * Cleanup and fix formatting * Update src/lua/util.rs Co-authored-by: Arijit Basu <sayanarijit@users.noreply.github.com> * Update wrap to return lines instead * Fix doc * Rename wrap -> text wrap Co-authored-by: Arijit Basu <sayanarijit@users.noreply.github.com> Co-authored-by: Arijit Basu <sayanarijit@gmail.com> * Add xplr.util.relative_to and xplr.util.path_shorthand (#568) * Add xplr.util.relative_to and xplr.util.path_shorthand * Remove duplicate slash at end * Use pwd from env and remove pathdiff package * Some fixes and improvements * Generate docs * Some more improvements * Improve selection rendering * Improve functions with test cases * Update docs * Minor doc fix * Rename path_shorthand -> shortened * Handle homedir edgecase Also fix init.lua * Minor fix * Use config argument for relative and shortened paths * Prefix relative paths with "." and fix edge cases where we're not showing the file name * Use and_then instead of map and flatten * WIP: Move selection rendering to lua * Make selection renderer function configurable on lua side * Some improvements * Some impovements * Minor doc fix * Remove symlink style --------- Co-authored-by: Arijit Basu <sayanarijit@gmail.com> * Add xplr.util.layout_replaced (#574) Closes: https://github.com/sayanarijit/xplr/issues/573 * Improve selection operations (#575) - `:sl` to list selection. - `:ss` to softlink. - `:sh` to hardlink. - Avoid conflict by adding suffix. - Unselect individual path only on operation success. Closes: - https://github.com/sayanarijit/xplr/issues/572 - https://github.com/sayanarijit/xplr/issues/571 - https://github.com/sayanarijit/xplr/issues/570 * Minor updates * Add more features (#581) * Add more features - Key binding ":se" to edit selection list in $EDITOR - New utility functions: - xplr.util.clone - xplr.util.exists - xplr.util.is_dir - xplr.util.is_file - xplr.util.is_symlink - xplr.util.is_absolute - xplr.util.path_split - xplr.util.node Closes: https://github.com/sayanarijit/xplr/issues/580 Closes: https://github.com/sayanarijit/xplr/issues/579 Closes: https://github.com/sayanarijit/xplr/issues/577 * Fix edit selection list * Fix clippy lints * Fix layout link in doc * xplr.util.shortened -> xplr.util.shorten * Fix more clippy lints * Fix xplr.util.shorten name change * More UI utilities and improvements (#582) * More UI utilities and improvements - Apply style only to the file column in the table. - Properly quote paths. - Expose the applicable style from config in the table renderer argument. - Add utility functions: - xplr.util.node_type - xplr.util.style_mix - xplr.util.shell_escape * Make escaping play nice with shorten * Fix tests * Fix doc * Some fixes * Fix selection editor * Fix clear selection for selection editor * Add selection navigation (#583) * Add selection navigation - FocusNextSelection (ctrl-n) - FocusPreviousSelection (ctrl-p) Also improve batch operations * Minor doc fixes * Minor doc fix * Remove tab -> ctrl-i binding * Improve batch operation interaction - More robust focus operation. - Focus on failed to delete paths. * Fix Rust compatibility * Fix panic on permission denial Also, improve the error messages. * More logging improvements * Fix layout_replace only working with table parameters (#586) * Improve builtin search mode (#585) * Improve builtin search mode * Remove commented out code * Make search ranking and algorithm more extensible * Flatten messages BREAKING: xplr.config.general.sort_and_filter_ui.search_identifier -> xplr.config.general.sort_and_filter_ui.search_identifiers Messages: - Search - SearchFromInput - SearchFuzzy - SearchFuzzyUnranked - SearchFuzzyUnrankedFromInput - SearchRegexUnrankedFromInput - SearchRegex - SearchRegexUnranked - SearchRegexUnrankedFromInput - SearchRegexUnrankedFromInput - CycleSearchAlgorithm - EnableRankedSearch - DisableRankedSearch - ToggleRankedSearch Static config: xplr.config.general.search.algorithm = "Fuzzy" * Handle search ranking in search algorithm * Make CycleSearchAlgorithm only cycle between algorithms, without changing ranking * Separate algorithm and ordering * Minor doc updates * Some cleanup * Final touch * Cycle -> Toggle --------- Co-authored-by: Arijit Basu <sayanarijit@gmail.com> * Fix layout replace for unit layouts (#588) * Allow custom title and ui config in custom layout. (#589) * Allow custom title and ui config in custom layout. Adds the following layouts: - Static - Dynamic Deprecates `CustomContent` (but won't be removed to maintain compatibility). Closes: https://github.com/sayanarijit/xplr/issues/563 * Delete init.lua * Update docs/en/src/layout.md * Update docs/en/src/layout.md * Rename - Paragraph => CustomParagraph - List => CustomList - Table => CustomTable Also update init.lua * Fix clippy errs * Fix doc links * Fix search order * Improve working with file permissions (#591) * Improve working with file permissions Implements: - xplr.util.permissions_rwx - xplr.util.permissions_octal * Edit permissions * Add permissions in Resolved Node (#592) * Add permissions in Relolved Node And handle application/x-executable mime type. * Fix bench * Improve permissions editor * More permissions editor improvements * Doc updates * Remove ResolvedNode.permissions (#593) Reason: Too much serialization making lua calls slow. * Add workaround for macos with legacy coreutils (#595) Refs: - https://github.com/sayanarijit/xplr/issues/594 - https://github.com/sayanarijit/xplr/issues/559 * Use H:M:S format to display logs (#596) * Keep the selection list and clear manually (#597) * Keep the selection list and clear manually Ref: https://github.com/sayanarijit/map.xplr/issues/4 * Fix linting err * Fix broken history (#599) * Fix broken hostory Fixes: https://github.com/sayanarijit/xplr/issues/598 * Minor cleanup * Slightly optimize selection retention (#600) * Update deps * chrono -> time * update: 0.20.2 -> 0.21.1 * Update post-install.md * Upgrade guide * Minor fix * Fix tests * Add missing doc * Fix clippy lints --------- Co-authored-by: Noah Mayr <dev@noahmayr.com>
1 year ago
#### SearchFuzzyUnordered
Like `SearchFuzzy`, but doesn't not perform rank based sorting.
You need to call `ExplorePwd` or `ExplorePwdAsync` explicitely.
It gets reset automatically when changing directory.
Type: { SearchFuzzyUnordered = "string" }
Example:
- Lua: `{ SearchFuzzyUnordered = "pattern" }`
- YAML: `SearchFuzzyUnordered: pattern`
#### SearchFuzzyUnorderedFromInput
Calls `SearchFuzzyUnordered` with the input taken from the input buffer.
You need to call `ExplorePwd` or `ExplorePwdAsync` explicitely.
It gets reset automatically when changing directory.
Example:
- Lua: `"SearchFuzzyUnorderedFromInput"`
- YAML: `SearchFuzzyUnorderedFromInput`
#### SearchRegex
Search files using regex match algorithm.
It keeps the filters, but overrides the sorters.
You need to call `ExplorePwd` or `ExplorePwdAsync` explicitely.
It gets reset automatically when changing directory.
Type: { SearchRegex = "string" }
Example:
- Lua: `{ SearchRegex = "pattern" }`
- YAML: `SearchRegex: pattern`
#### SearchRegexFromInput
Calls `SearchRegex` with the input taken from the input buffer.
You need to call `ExplorePwd` or `ExplorePwdAsync` explicitely.
It gets reset automatically when changing directory.
Example:
- Lua: `"SearchRegexFromInput"`
- YAML: `SearchRegexFromInput`
#### SearchRegexUnordered
Like `SearchRegex`, but doesn't not perform rank based sorting.
You need to call `ExplorePwd` or `ExplorePwdAsync` explicitely.
It gets reset automatically when changing directory.
Type: { SearchRegexUnordered = "string" }
Example:
- Lua: `{ SearchRegexUnordered = "pattern" }`
- YAML: `SearchRegexUnordered: pattern`
#### SearchRegexUnorderedFromInput
Calls `SearchRegexUnordered` with the input taken from the input buffer.
You need to call `ExplorePwd` or `ExplorePwdAsync` explicitely.
It gets reset automatically when changing directory.
Example:
- Lua: `"SearchRegexUnorderedFromInput"`
- YAML: `SearchRegexUnorderedFromInput`
#### ToggleSearchAlgorithm
Toggles between different search algorithms, without changing the input
buffer
You need to call `ExplorePwd` or `ExplorePwdAsync` explicitely.
Example:
- Lua: `"ToggleSearchAlgorithm"`
- YAML: `ToggleSearchAlgorithm`
#### EnableSearchOrder
Enables ranked search without changing the input buffer.
You need to call `ExplorePwd` or `ExplorePwdAsync` explicitely.
Example:
- Lua: `"EnableOrderedSearch"`
- YAML: `EnableSearchOrder`
#### DisableSearchOrder
Disabled ranked search without changing the input buffer.
You need to call `ExplorePwd` or `ExplorePwdAsync` explicitely.
Example:
- Lua: `"DisableSearchOrder"`
- YAML: `DisableSearchOrder`
#### ToggleSearchOrder
Toggles ranked search without changing the input buffer.
Example:
- Lua: `"ToggleSearchOrder"`
- YAML: `ToggleSearchOrder`
#### AcceptSearch
Accepts the search by keeping the latest focus while in search mode.
Automatically calls `ExplorePwd`.
Example:
- Lua: `"AcceptSearch"`
- YAML: `AcceptSearch`
#### CancelSearch
Cancels the search by discarding the latest focus and recovering
the focus before search.
Automatically calls `ExplorePwd`.
Example:
- Lua: `"CancelSearch"`
- YAML: `CancelSearch`
### Mouse Operations
#### EnableMouse
Enable mouse
Example:
2 years ago
- Lua: `"EnableMouse"`
- YAML: `EnableMouse`
#### DisableMouse
Disable mouse
Example:
2 years ago
- Lua: `"DisableMouse"`
- YAML: `DisableMouse`
#### ToggleMouse
Toggle mouse
Example:
2 years ago
- Lua: `"ToggleMouse"`
- YAML: `ToggleMouse`
### Fifo Operations
#### StartFifo
Start piping the focused path to the given fifo path
Type: { StartFifo = "string" }
Example:
2 years ago
- Lua: `{ StartFifo = "/tmp/xplr.fifo }`
- YAML: `StartFifo: /tmp/xplr.fifo`
#### StopFifo
Close the active fifo and stop piping.
Example:
2 years ago
- Lua: `"StopFifo"`
- YAML: `StopFifo`
#### ToggleFifo
Toggle betwen {Start|Stop}Fifo
Type: { ToggleFifo = "string" }
Example:
2 years ago
- Lua: `{ ToggleFifo = "/path/to/fifo" }`
- YAML: `ToggleFifo: /path/to/fifo`
### Logging
#### LogInfo
Log information message.
Type: { LogInfo = "string" }
Example:
2 years ago
- Lua: `{ LogInfo = "launching satellite" }`
- YAML: `LogInfo: launching satellite`
#### LogSuccess
Log a success message.
Type: { LogSuccess = "String" }
Example:
2 years ago
- Lua: `{ LogSuccess = "satellite reached destination" }`
- YAML: `LogSuccess: satellite reached destination`
#### LogWarning
Log an warning message.
Type: { LogWarning = "string" }
Example:
2 years ago
- Lua: `{ LogWarning = "satellite is heating" }`
- YAML: `LogWarning: satellite is heating`
#### LogError
Log an error message.
Type: { LogError = "string" }
Example:
2 years ago
- Lua: `{ LogError = "satellite crashed" }`
- YAML: `LogError: satellite crashed`
### Debugging
#### Debug
Write the application state to a file, without quitting. Also helpful
for debugging.
Type: { Debug = "string" }
Example:
2 years ago
- Lua: `{ Debug = "/path/to/file" }`
- YAML: `Debug: /path/to/file`
### Quit Options
#### Quit
Example:
2 years ago
- Lua: `"Quit"`
- YAML: `Quit`
Quit with returncode zero (success).
#### PrintPwdAndQuit
Print $PWD and quit.
Example:
2 years ago
- Lua: `"PrintPwdAndQuit"`
- YAML: `PrintPwdAndQuit`
#### PrintFocusPathAndQuit
Print the path under focus and quit. It can be empty string if there's
nothing to focus.
Example:
2 years ago
- Lua: `"PrintFocusPathAndQuit"`
- YAML: `PrintFocusPathAndQuit`
#### PrintSelectionAndQuit
Print the selected paths and quit. It can be empty is no path is
selected.
Example:
2 years ago
- Lua: `"PrintSelectionAndQuit"`
- YAML: `PrintSelectionAndQuit`
#### PrintResultAndQuit
Print the selected paths if it's not empty, else, print the focused
node's path.
Example:
2 years ago
- Lua: `"PrintResultAndQuit"`
- YAML: `PrintResultAndQuit`
#### PrintAppStateAndQuit
Print the state of application in YAML format. Helpful for debugging or
generating the default configuration file.
Example:
2 years ago
- Lua: `"PrintAppStateAndQuit"`
- YAML: `PrintAppStateAndQuit`
#### Terminate
Terminate the application with a non-zero return code.
Example:
2 years ago
- Lua: `"Terminate"`
- YAML: `Terminate`
## Also See:
2 years ago
- [Message][1]
[1]: message.md