-
-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
6 changed files
with
313 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
Filtering | ||
========= | ||
|
||
xplr supports filtering paths by different properties. The filtering mechanism | ||
works like a pipeline, which in visible in the `Sort & filter` panel. | ||
|
||
Example: | ||
|
||
``` | ||
rel!^. › [i]abs=~abc › [i]rel!~xyz | ||
``` | ||
|
||
This line means that the nodes visible on the table will first be filtered by | ||
the condition: *relative path does not start with `.`*, then by the condition: | ||
*absolute path contains `abc` (case insensitive)*, and finally by the | ||
condition: *relative path does not contain `xyz`*. | ||
|
||
Each part of this pipeline is called [Node Filter Applicable](#node-filter-applicable). | ||
|
||
|
||
Node Filter Applicable | ||
---------------------- | ||
|
||
It contains the following information: | ||
|
||
- [filter](#filter) | ||
- [input](#input) | ||
|
||
### filter | ||
|
||
A filter can be one of the following: | ||
|
||
- "RelativePathIs" | ||
- "RelativePathIsNot" | ||
- "IRelativePathIs" | ||
- "IRelativePathIsNot" | ||
- "RelativePathDoesStartWith" | ||
- "RelativePathDoesNotStartWith" | ||
- "IRelativePathDoesStartWith" | ||
- "IRelativePathDoesNotStartWith" | ||
- "RelativePathDoesContain" | ||
- "RelativePathDoesNotContain" | ||
- "IRelativePathDoesContain" | ||
- "IRelativePathDoesNotContain" | ||
- "RelativePathDoesEndWith" | ||
- "RelativePathDoesNotEndWith" | ||
- "IRelativePathDoesEndWith" | ||
- "IRelativePathDoesNotEndWith" | ||
- "AbsolutePathIs" | ||
- "AbsolutePathIsNot" | ||
- "IAbsolutePathIs" | ||
- "IAbsolutePathIsNot" | ||
- "AbsolutePathDoesStartWith" | ||
- "AbsolutePathDoesNotStartWith" | ||
- "IAbsolutePathDoesStartWith" | ||
- "IAbsolutePathDoesNotStartWith" | ||
- "AbsolutePathDoesContain" | ||
- "AbsolutePathDoesNotContain" | ||
- "IAbsolutePathDoesContain" | ||
- "IAbsolutePathDoesNotContain" | ||
- "AbsolutePathDoesEndWith" | ||
- "AbsolutePathDoesNotEndWith" | ||
- "IAbsolutePathDoesEndWith" | ||
- "IAbsolutePathDoesNotEndWith" | ||
|
||
|
||
TODO: document each | ||
|
||
### input | ||
|
||
Type: string | ||
|
||
The input for the condition. | ||
|
||
|
||
Example: | ||
-------- | ||
|
||
```lua | ||
ToggleNodeFilter = { | ||
filter = "RelativePathDoesNotStartWith", | ||
input = "." | ||
} | ||
``` | ||
|
||
Here, `ToggleNodeFilter` is a [message](message.md) that adds or removes | ||
(toggles) the filter applied. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
Sorting | ||
======= | ||
|
||
xplr supports sorting paths by different properties. The sorting mechanism | ||
works like a pipeline, which in visible in the `Sort & filter` panel. | ||
|
||
Example: | ||
|
||
``` | ||
size↑ › [i]rel↓ › [c]dir↑ › [c]file↑ › sym↑ | ||
``` | ||
|
||
This line means that the nodes visible on the table will be first sorted by | ||
relative file size, then by case insensitive relative path, then by the | ||
canonical (symlink resolved) type of the node, and finally by whether or not | ||
the node is a symlink. | ||
|
||
The arrows denote the order. | ||
|
||
Each part of this pipeline is called [Node Sorter Applicable](#node-sorter-applicable). | ||
|
||
|
||
Node Sorter Applicable | ||
---------------------- | ||
|
||
It contains the following information: | ||
|
||
- [sorter](#sorter) | ||
- [reverse](#reverse) | ||
|
||
|
||
### sorter | ||
|
||
A sorter can be one of the following: | ||
|
||
- "ByRelativePath" | ||
- "ByIRelativePath" | ||
- "ByExtension" | ||
- "ByIsDir" | ||
- "ByIsFile" | ||
- "ByIsSymlink" | ||
- "ByIsBroken" | ||
- "ByIsReadonly" | ||
- "ByMimeEssence" | ||
- "BySize" | ||
- "ByCanonicalAbsolutePath" | ||
- "ByICanonicalAbsolutePath" | ||
- "ByCanonicalExtension" | ||
- "ByCanonicalIsDir" | ||
- "ByCanonicalIsFile" | ||
- "ByCanonicalIsReadonly" | ||
- "ByCanonicalMimeEssence" | ||
- "ByCanonicalSize" | ||
- "BySymlinkAbsolutePath" | ||
- "ByISymlinkAbsolutePath" | ||
- "BySymlinkExtension" | ||
- "BySymlinkIsDir" | ||
- "BySymlinkIsFile" | ||
- "BySymlinkIsReadonly" | ||
- "BySymlinkMimeEssence" | ||
- "BySymlinkSize" | ||
|
||
TODO: document each | ||
|
||
|
||
### reverse | ||
|
||
Type: boolean | ||
|
||
It defined the direction of the order. | ||
|
||
|
||
Example | ||
------- | ||
|
||
```lua | ||
xplr.config.general.initial_sorting = { | ||
{ sorter = "ByCanonicalIsDir", reverse = true }, | ||
{ sorter = "ByIRelativePath", reverse = false }, | ||
} | ||
``` | ||
|
||
This snippet defines the initial sorting logic to be applied when xplr loads. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters