mirror of
https://github.com/sayanarijit/xplr.git
synced 2024-08-15 22:10:27 +03:00
Release v0.20.0
This commit is contained in:
parent
49c4729047
commit
15979e4974
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -1351,7 +1351,7 @@ checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5"
|
||||
|
||||
[[package]]
|
||||
name = "xplr"
|
||||
version = "0.20.0-beta.3"
|
||||
version = "0.20.0"
|
||||
dependencies = [
|
||||
"ansi-to-tui",
|
||||
"anyhow",
|
||||
|
@ -8,7 +8,7 @@ path = './benches/criterion.rs'
|
||||
|
||||
[package]
|
||||
name = 'xplr'
|
||||
version = '0.20.0-beta.3'
|
||||
version = '0.20.0'
|
||||
authors = ['Arijit Basu <hi@arijitbasu.in>']
|
||||
edition = '2021'
|
||||
description = 'A hackable, minimal, fast TUI file explorer'
|
||||
|
@ -34,7 +34,6 @@
|
||||
- [Awesome Plugins][18]
|
||||
- [Integration][19]
|
||||
- [Awesome Integrations][20]
|
||||
- [TODO][21]
|
||||
- [Alternatives][22]
|
||||
- [Upgrade Guide][23]
|
||||
- [Community][24]
|
||||
@ -60,7 +59,6 @@
|
||||
[18]: awesome-plugins.md
|
||||
[19]: integration.md
|
||||
[20]: awesome-integrations.md
|
||||
[21]: todo.md
|
||||
[22]: alternatives.md
|
||||
[23]: upgrade-guide.md
|
||||
[24]: community.md
|
||||
|
@ -68,8 +68,6 @@ A filter can be one of the following:
|
||||
- "IAbsolutePathDoesMatchRegex"
|
||||
- "IAbsolutePathDoesNotMatchRegex"
|
||||
|
||||
TODO: document each
|
||||
|
||||
### input
|
||||
|
||||
Type: string
|
||||
|
@ -53,14 +53,17 @@ to lose some kb if it makes sense.
|
||||
Some of the coolest features xplr provide beside the basic stuff:
|
||||
|
||||
- [Embedded LuaJIT][5] for portability and extensibility.
|
||||
- [A simple system based on message passing][10] to control xplr session using:
|
||||
- [A simple modal system based on message passing][10] to control xplr session
|
||||
using:
|
||||
- [Keyboard inputs][11]
|
||||
- [Shell Commands][12]
|
||||
- [Lua Functions][13]
|
||||
- [Readline-like input buffer][9] with customizable behaviour to read user
|
||||
- [Hooks][22]
|
||||
- Easy, typesafe message passing with `-m MSG` or `-M MSG` subcommands.
|
||||
- [Readline-like input buffer][9] with customizable behavior to read user
|
||||
inputs.
|
||||
- [Switchable recover mode][7] that saves you from doing unwanted things when in a
|
||||
hurry.
|
||||
- [Switchable recover mode][7] that saves you from doing unwanted things when
|
||||
in a hurry.
|
||||
- [Customizable layouts][1] with built-in panels. For e.g.
|
||||
- **Selection list** to show you the selected paths in real-time.
|
||||
- **Help menu** to show you the available keys bindings in each mode.
|
||||
@ -69,6 +72,7 @@ Some of the coolest features xplr provide beside the basic stuff:
|
||||
- [Custom file properties][17] with custom colors can be displayed in the table.
|
||||
- [FIFO manager][19] to manage a FIFO file that can be used to
|
||||
[integrate with previewers][6].
|
||||
- [Virtual root][21] with `--vroot` and `:v` key bindings.
|
||||
- **Different quit options:**
|
||||
- Quit with success without any output (`q`).
|
||||
- Quit with success and the result printed on stdout (`enter`).
|
||||
@ -88,10 +92,10 @@ Some of the coolest features xplr provide beside the basic stuff:
|
||||
[4]: https://github.com/sayanarijit/xplr/tree/main/benches
|
||||
[5]: https://github.com/sayanarijit/xplr/discussions/183
|
||||
[6]: https://github.com/sayanarijit/xplr/pull/229
|
||||
[7]: general-config.md#enable_recover_mode
|
||||
[7]: modes.md#xplrconfigmodesbuiltinrecover
|
||||
[8]: default-key-bindings.md
|
||||
[9]: https://github.com/sayanarijit/xplr/pull/397
|
||||
[10]: message.md
|
||||
[10]: messages.md
|
||||
[11]: configure-key-bindings.md
|
||||
[12]: mode.md#input-pipe
|
||||
[13]: lua-function-calls.md
|
||||
@ -100,5 +104,7 @@ Some of the coolest features xplr provide beside the basic stuff:
|
||||
[16]: awesome-hacks.md
|
||||
[17]: node_types.md
|
||||
[18]: https://github.com/sayanarijit/xplr/blob/main/src/init.lua
|
||||
[19]: message.md#startfifo
|
||||
[19]: messages.md#startfifo
|
||||
[20]: community.md
|
||||
[21]: messages.md#virtual-root
|
||||
[22]: configuration.md#hooks
|
||||
|
@ -160,8 +160,6 @@ A constraint can be one of the following:
|
||||
- { MinLessThanLayoutHeight = int }
|
||||
- { MinLessThanLayoutWidth = int }
|
||||
|
||||
TODO: document each constraint.
|
||||
|
||||
## splits
|
||||
|
||||
Type: list of [Layout][3]
|
||||
|
@ -8,6 +8,34 @@ When called the function receives a [special argument][14] that
|
||||
contains some useful information. The function can optionally return a list of
|
||||
messages which will be handled by xplr.
|
||||
|
||||
## Example: Using Lua Function Calls
|
||||
|
||||
```lua
|
||||
-- Define the function
|
||||
xplr.fn.custom.ask_name_and_greet = function(app)
|
||||
print("What's your name?")
|
||||
|
||||
local name = io.read()
|
||||
local greeting = "Hello " .. name .. "!"
|
||||
local message = greeting .. " You are inside " .. app.pwd
|
||||
|
||||
return {
|
||||
{ LogSuccess = message },
|
||||
}
|
||||
end
|
||||
|
||||
-- Map the function to a key (space)
|
||||
xplr.config.modes.builtin.default.key_bindings.on_key.space = {
|
||||
help = "ask name and greet",
|
||||
messages = {
|
||||
{ CallLua = "custom.ask_name_and_greet" }
|
||||
}
|
||||
}
|
||||
|
||||
-- Now, when you press "space" in default mode, you will be prompted for your
|
||||
-- name. Enter your name to receive a nice greeting and to know your location.
|
||||
```
|
||||
|
||||
## Lua Context
|
||||
|
||||
This is a special argument passed to the lua functions when called using the
|
||||
@ -105,7 +133,9 @@ The session path.
|
||||
|
||||
### explorer_config
|
||||
|
||||
[TODO][66]
|
||||
Type: [ExplorerConfig][66]
|
||||
|
||||
The configuration for exploring paths.
|
||||
|
||||
### history
|
||||
|
||||
@ -313,33 +343,48 @@ Type: list of string
|
||||
|
||||
Visited paths.
|
||||
|
||||
## Example: Using Lua Function Calls
|
||||
## Explorer Config
|
||||
|
||||
```lua
|
||||
-- Define the function
|
||||
xplr.fn.custom.ask_name_and_greet = function(app)
|
||||
print("What's your name?")
|
||||
Explorer config contains the following fields:
|
||||
|
||||
local name = io.read()
|
||||
local greeting = "Hello " .. name .. "!"
|
||||
local message = greeting .. " You are inside " .. app.pwd
|
||||
- [filters][77]
|
||||
- [sorters][78]
|
||||
- [searchers][79]
|
||||
|
||||
return {
|
||||
{ LogSuccess = message },
|
||||
}
|
||||
end
|
||||
### filters
|
||||
|
||||
-- Map the function to a key (space)
|
||||
xplr.config.modes.builtin.default.key_bindings.on_key.space = {
|
||||
help = "ask name and greet",
|
||||
messages = {
|
||||
{ CallLua = "custom.ask_name_and_greet" }
|
||||
}
|
||||
}
|
||||
List of filters to apply.
|
||||
|
||||
-- Now, when you press "space" in default mode, you will be prompted for your
|
||||
-- name. Enter your name to receive a nice greeting and to know your location.
|
||||
```
|
||||
Type: list of [Node Filter Applicable][80]
|
||||
|
||||
### sorters
|
||||
|
||||
Add list or sorters to the pipeline.
|
||||
|
||||
Type: list of [Node Sorter Applicable][81]
|
||||
|
||||
### searchers
|
||||
|
||||
Type: nullable [Node Searcher][82]
|
||||
|
||||
## Node Searcher
|
||||
|
||||
Node Searcher contains the following fields:
|
||||
|
||||
- [pattern][83]
|
||||
- [recoverable_focus][84]
|
||||
|
||||
### pattern
|
||||
|
||||
The patters used to search.
|
||||
|
||||
Type: string
|
||||
|
||||
### recoverable_focus
|
||||
|
||||
Where to focus when search is cancelled.
|
||||
|
||||
Type: nullable string
|
||||
|
||||
[7]: https://www.json.org
|
||||
[8]: modes.md#mode
|
||||
@ -389,7 +434,7 @@ xplr.config.modes.builtin.default.key_bindings.on_key.space = {
|
||||
[63]: #nodes
|
||||
[64]: #total
|
||||
[65]: #focus
|
||||
[66]: https://docs.rs/xplr/latest/xplr/app/struct.ExplorerConfig.html
|
||||
[66]: #explorer-config
|
||||
[67]: #history
|
||||
[68]: #loc
|
||||
[69]: #paths
|
||||
@ -400,3 +445,11 @@ xplr.config.modes.builtin.default.key_bindings.on_key.space = {
|
||||
[74]: #gid
|
||||
[75]: #vroot
|
||||
[76]: #initial_pwd
|
||||
[77]: #filters
|
||||
[78]: #sorters
|
||||
[79]: #searchers
|
||||
[80]: filtering.md#node-filter-applicable
|
||||
[81]: sorting.md#node-sorter-applicable
|
||||
[82]: #node-searcher
|
||||
[83]: #pattern
|
||||
[84]: #recoverable_focus
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Full List of Messages
|
||||
|
||||
xplr messages categorized based on their purpose.
|
||||
xplr [messages][1] categorized based on their purpose.
|
||||
|
||||
## Categories
|
||||
|
||||
@ -1251,4 +1251,6 @@ Example:
|
||||
|
||||
## Also See:
|
||||
|
||||
- [Message](message.md)
|
||||
- [Message][1]
|
||||
|
||||
[1]: message.md
|
||||
|
@ -62,8 +62,6 @@ A sorter can be one of the following:
|
||||
- "BySymlinkCreated"
|
||||
- "BySymlinkLastModified"
|
||||
|
||||
TODO: document each
|
||||
|
||||
### reverse
|
||||
|
||||
Type: boolean
|
||||
|
@ -1,34 +0,0 @@
|
||||
# TODO
|
||||
|
||||
- [x] Saner key bindings.
|
||||
- [x] Pipes.
|
||||
- [x] Native search & filter.
|
||||
- [x] Create, copy, move, delete files directly.
|
||||
- [x] logging support.
|
||||
- [x] Version compatibility instructions.
|
||||
- [x] Implement CLI arguments.
|
||||
- ~Add support for tabs and/or panes (non native)~ [hacked][1] | [discussion][2]
|
||||
- ~Implement bookmarks.~ [hacked][3]
|
||||
- [x] Add sorting support.
|
||||
- [x] Add filter support.
|
||||
- [x] File previews.
|
||||
- [x] Implement plugins support (or some way to easily share configuration).
|
||||
- [x] Bigger (and better) help menu.
|
||||
- [x] Offline docs.
|
||||
- [ ] Support for background services
|
||||
- [x] ~Customize~ switch UI at run-time.
|
||||
- [ ] More tests and benchmarks.
|
||||
- [ ] Measure code coverage.
|
||||
- [ ] Improve the [vim plugin][4].
|
||||
- [ ] Cleanup, refactor, optimize.
|
||||
|
||||
[add more][5]
|
||||
|
||||
Like this project so far? **[Please consider contributing][6].**
|
||||
|
||||
[1]: https://github.com/sayanarijit/xplr/wiki/Hacks#spawn-multiple-sessions-in-different-windows
|
||||
[2]: https://github.com/sayanarijit/xplr/discussions/15
|
||||
[3]: https://github.com/sayanarijit/xplr/wiki/Hacks#bookmark
|
||||
[4]: https://github.com/sayanarijit/xplr.vim
|
||||
[5]: https://github.com/sayanarijit/xplr/discussions/2
|
||||
[6]: contribute.md
|
@ -45,7 +45,7 @@ compatibility.
|
||||
|
||||
### Instructions
|
||||
|
||||
#### [v0.19.4][47] -> [v0.20.0-beta.3][48]
|
||||
#### [v0.19.4][47] -> [v0.20.0][48]
|
||||
|
||||
- BREAKING: xplr shell (`:!`) will default to null (`\0`) delimited pipes, as
|
||||
opposed to newline (`\n`) delimited ones (i.e. will use `Call0` instead of
|
||||
@ -74,6 +74,9 @@ compatibility.
|
||||
- UnsetVroot
|
||||
- ToggleVroot
|
||||
- ResetVroot
|
||||
- Use `$XPLR_INITIAL_PWD` and Lua equivalent to implement workspace like
|
||||
features without using virtual root. Use keys `gi` to go to the initial
|
||||
working directory from anywhere.
|
||||
|
||||
#### [v0.18.0][46] -> [v0.19.4][47]
|
||||
|
||||
@ -432,4 +435,4 @@ Else do the following:
|
||||
[45]: https://github.com/sayanarijit/xplr/releases/tag/v0.17.6
|
||||
[46]: https://github.com/sayanarijit/xplr/releases/tag/v0.18.0
|
||||
[47]: https://github.com/sayanarijit/xplr/releases/tag/v0.19.4
|
||||
[48]: https://github.com/sayanarijit/xplr/releases/tag/v0.20.0-beta.3
|
||||
[48]: https://github.com/sayanarijit/xplr/releases/tag/v0.20.0
|
||||
|
@ -9,7 +9,7 @@ from typing import List
|
||||
MESSAGES_DOC_TEMPLATE = """
|
||||
# Full List of Messages
|
||||
|
||||
xplr messages categorized based on their purpose.
|
||||
xplr [messages][1] categorized based on their purpose.
|
||||
|
||||
## Categories
|
||||
|
||||
@ -19,7 +19,9 @@ xplr messages categorized based on their purpose.
|
||||
|
||||
## Also See:
|
||||
|
||||
- [Message](message.md)
|
||||
- [Message][1]
|
||||
|
||||
[1]: message.md
|
||||
""".strip()
|
||||
|
||||
CONFIGURATION_DOC_TEMPLATE = """
|
||||
|
10
src/lua.rs
10
src/lua.rs
@ -155,24 +155,24 @@ mod tests {
|
||||
assert!(check_version(VERSION, "foo path").is_ok());
|
||||
|
||||
// Current release if OK
|
||||
assert!(check_version("0.20.0-beta.3", "foo path").is_ok());
|
||||
assert!(check_version("0.20.0", "foo path").is_ok());
|
||||
|
||||
// Prev major release is ERR
|
||||
// - Not yet
|
||||
|
||||
// Prev minor release is ERR (Change when we get to v1)
|
||||
assert!(check_version("0.19.0-beta.3", "foo path").is_err());
|
||||
assert!(check_version("0.19.0", "foo path").is_err());
|
||||
|
||||
// Prev bugfix release is OK
|
||||
// assert!(check_version("0.20.-1", "foo path").is_ok());
|
||||
|
||||
// Next major release is ERR
|
||||
assert!(check_version("1.20.0-beta.3", "foo path").is_err());
|
||||
assert!(check_version("1.20.0", "foo path").is_err());
|
||||
|
||||
// Next minor release is ERR
|
||||
assert!(check_version("0.21.0-beta.3", "foo path").is_err());
|
||||
assert!(check_version("0.21.0", "foo path").is_err());
|
||||
|
||||
// Next bugfix release is ERR (Change when we get to v1)
|
||||
assert!(check_version("0.20.1-beta.3", "foo path").is_err());
|
||||
assert!(check_version("0.20.1", "foo path").is_err());
|
||||
}
|
||||
}
|
||||
|
@ -349,8 +349,6 @@ impl Runner {
|
||||
match msg {
|
||||
// NOTE: Do not schedule critical tasks via tx_msg_in in this loop.
|
||||
// Try handling them immediately.
|
||||
//
|
||||
// TODO: Remove boilerplate code.
|
||||
Enque(task) => {
|
||||
tx_msg_in.send(task)?;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user