Skip to content

Commit

Permalink
Release 0.21.0 (#602)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>

* 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 <[email protected]>

* Update wrap to return lines instead

* Fix doc

* Rename wrap -> text wrap

Co-authored-by: Arijit Basu <[email protected]>
Co-authored-by: Arijit Basu <[email protected]>

* 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 <[email protected]>

* Add xplr.util.layout_replaced (#574)

Closes: #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:

- #572
- #571
- #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: #580
Closes: #579
Closes: #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 <[email protected]>

* 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: #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:
- #594
- #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: sayanarijit/map.xplr#4

* Fix linting err

* Fix broken history (#599)

* Fix broken hostory

Fixes: #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 <[email protected]>
  • Loading branch information
sayanarijit and noahmayr authored Mar 19, 2023
1 parent 59279b8 commit e0d683b
Show file tree
Hide file tree
Showing 35 changed files with 4,617 additions and 1,031 deletions.
824 changes: 655 additions & 169 deletions Cargo.lock

Large diffs are not rendered by default.

42 changes: 24 additions & 18 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ path = './benches/criterion.rs'

[package]
name = 'xplr'
version = '0.20.2'
version = '0.21.0'
authors = ['Arijit Basu <[email protected]>']
edition = '2021'
description = 'A hackable, minimal, fast TUI file explorer'
Expand All @@ -22,20 +22,29 @@ categories = ['command-line-interface', 'command-line-utilities']
include = ['src/**/*', 'docs/en/src/**/*', 'LICENSE', 'README.md']

[dependencies]
libc = "0.2.139"
libc = "0.2.140"
humansize = "2.1.3"
natord = "1.0.9"
anyhow = "1.0.68"
serde_yaml = "0.9.16"
crossterm = "0.25.0"
dirs = "4.0.0"
ansi-to-tui = "2.0.0"
anyhow = "1.0.70"
serde_yaml = "0.9.19"
crossterm = "0.26.1"
dirs = "5.0.0"
ansi-to-tui-forked = "3.0.0-ratatui"
regex = "1.7.1"
gethostname = "0.4.1"
fuzzy-matcher = "0.3.7"
serde_json = "1.0.91"
serde_json = "1.0.94"
path-absolutize = "3.0.14"
which = "4.3.0"
which = "4.4.0"
nu-ansi-term = "0.47.0"
textwrap = "0.16"
snailquote = "0.3.1"
skim = "0.10.4"
time = { version = "0.3.20", features = ["serde", "local-offset", "formatting", "macros"] }

[dependencies.lscolors]
version = "0.13.0"
default-features = false
features = ["nu-ansi-term"]

[dependencies.lazy_static]
version = "1.4.0"
Expand All @@ -46,24 +55,21 @@ version = "2.0.4"
features = ["rev-mappings"]

[dependencies.tui]
version = "0.19.0"
version = "0.20.0"
default-features = false
features = ['crossterm', 'serde']
package = 'ratatui'

[dependencies.serde]
version = "1.0.152"
version = "1.0.157"
features = ['derive']

[dependencies.chrono]
version = "0.4.23"
features = ['serde']

[dependencies.indexmap]
version = "1.9.2"
features = ['serde']

[dependencies.mlua]
version = "0.8.7"
version = "0.8.8"
features = ['luajit', 'vendored', 'serialize', 'send']

[dependencies.tui-input]
Expand All @@ -72,7 +78,7 @@ features = ['serde']

[dev-dependencies]
criterion = "0.4.0"
assert_cmd = "2.0.8"
assert_cmd = "2.0.10"

[profile.release]
lto = true
Expand Down
10 changes: 6 additions & 4 deletions benches/criterion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ fn navigation_benchmark(c: &mut Criterion) {
});

let lua = mlua::Lua::new();
let mut app = app::App::create(PWD.into(), &lua, None, [].into())
.expect("failed to create app");
let mut app =
app::App::create("xplr".into(), None, PWD.into(), &lua, None, [].into())
.expect("failed to create app");

app = app
.clone()
Expand Down Expand Up @@ -97,8 +98,9 @@ fn draw_benchmark(c: &mut Criterion) {
});

let lua = mlua::Lua::new();
let mut app = app::App::create(PWD.into(), &lua, None, [].into())
.expect("failed to create app");
let mut app =
app::App::create("xplr".into(), None, PWD.into(), &lua, None, [].into())
.expect("failed to create app");

app = app
.clone()
Expand Down
2 changes: 2 additions & 0 deletions docs/en/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
- [Input Operation][39]
- [Borders][31]
- [Style][11]
- [Searching][41]
- [Sorting][12]
- [Filtering][13]
- [Column Renderer][26]
Expand Down Expand Up @@ -79,3 +80,4 @@
[38]: messages.md
[39]: input-operation.md
[40]: xplr.util.md
[41]: searching.md
6 changes: 6 additions & 0 deletions docs/en/src/borders.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ A border can be one of the following:
- Double
- Thick

### Border Style

The [style][1] of the borders.

## Example

```lua
Expand All @@ -28,3 +32,5 @@ xplr.config.general.panel_ui.default.border_type = "Thick"
xplr.config.general.panel_ui.default.border_style.fg = "Black"
xplr.config.general.panel_ui.default.border_style.bg = "Gray"
```

[1]: style.md#style
9 changes: 9 additions & 0 deletions docs/en/src/column-renderer.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ The special argument contains the following fields
- [is_selected][25]
- [is_focused][26]
- [total][27]
- [style][38]
- [meta][28]

### parent
Expand Down Expand Up @@ -254,6 +255,12 @@ Type: integer

The total number of the nodes.

### style

Type: [Style][39]

The applicable [style object][39] for the node.

### meta

Type: mapping of string and string
Expand Down Expand Up @@ -333,3 +340,5 @@ It contains the following fields.
[35]: #last_modified
[36]: #uid
[37]: #gid
[38]: #style
[39]: style.md#style
Loading

0 comments on commit e0d683b

Please sign in to comment.