From 2f3c2ea0e4ba8bff7d1053b3abc2d5f3e1ab1ff3 Mon Sep 17 00:00:00 2001 From: Arijit Basu Date: Thu, 6 Jul 2023 22:18:07 +0530 Subject: [PATCH 01/23] Fix lint --- src/app.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app.rs b/src/app.rs index d180df6..2bdf9eb 100644 --- a/src/app.rs +++ b/src/app.rs @@ -1486,7 +1486,7 @@ impl App { if dir.parent == self.pwd { self.directory_buffer = Some(dir); - // Migh as well refresh the selection + // Might as well refresh the selection self = self.refresh_selection()?; }; From 0cc8723e8e1f032d1abe6841b45b35e14d0379f4 Mon Sep 17 00:00:00 2001 From: Arijit Basu Date: Thu, 6 Jul 2023 22:34:09 +0530 Subject: [PATCH 02/23] Document on_selection_change --- docs/en/src/configuration.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/en/src/configuration.md b/docs/en/src/configuration.md index 420d388..ef84ab0 100644 --- a/docs/en/src/configuration.md +++ b/docs/en/src/configuration.md @@ -131,6 +131,14 @@ return { { LogSuccess = "Switched layout" }, { CallLuaSilently = "custom.some_plugin_with_hooks.on_layout_switch" }, } + + -- Add messages to send when the selection changes + -- + -- Type: list of [Message](https://xplr.dev/en/message#message)s + on_selection_change = { + { LogSuccess = "Selection changed" }, + { CallLuaSilently = "custom.some_plugin_with_hooks.on_selection_change" }, + } } ``` From ba26752f6c370acf6b2a89d76a5256552f4d6d9a Mon Sep 17 00:00:00 2001 From: Arijit Basu Date: Fri, 7 Jul 2023 09:45:11 +0530 Subject: [PATCH 03/23] Use correct base for symlink for alternate layouts --- src/init.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/init.lua b/src/init.lua index e06f1a1..1d994cb 100644 --- a/src/init.lua +++ b/src/init.lua @@ -2915,7 +2915,8 @@ end xplr.fn.builtin.fmt_general_selection_item = function(n) local nl = xplr.util.paint("\\n", { add_modifiers = { "Italic", "Dim" } }) - local sh_config = { with_prefix_dots = true, without_suffix_dots = true } + local sh_config = + { base = n.parent, with_prefix_dots = true, without_suffix_dots = true } local shortened = xplr.util.shorten(n.absolute_path, sh_config) if n.is_dir then shortened = shortened .. "/" From d282032b3d447767059979f36d3ff5e2c0383f6d Mon Sep 17 00:00:00 2001 From: Arijit Basu Date: Fri, 7 Jul 2023 09:48:09 +0530 Subject: [PATCH 04/23] Fix symlink base again --- src/init.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/init.lua b/src/init.lua index 1d994cb..21228bf 100644 --- a/src/init.lua +++ b/src/init.lua @@ -2915,8 +2915,7 @@ end xplr.fn.builtin.fmt_general_selection_item = function(n) local nl = xplr.util.paint("\\n", { add_modifiers = { "Italic", "Dim" } }) - local sh_config = - { base = n.parent, with_prefix_dots = true, without_suffix_dots = true } + local sh_config = { with_prefix_dots = true, without_suffix_dots = true } local shortened = xplr.util.shorten(n.absolute_path, sh_config) if n.is_dir then shortened = shortened .. "/" @@ -2968,7 +2967,8 @@ xplr.fn.builtin.fmt_general_table_row_cols_1 = function(m) if m.is_broken then r = r .. "×" else - local symlink_path = xplr.util.shorten(m.symlink.absolute_path) + local symlink_path = + xplr.util.shorten(m.symlink.absolute_path, { base = m.parent }) if m.symlink.is_dir then symlink_path = symlink_path .. "/" end From 9844ae1476ba1464699685169de7667a1eda3580 Mon Sep 17 00:00:00 2001 From: Arijit Basu Date: Fri, 7 Jul 2023 15:13:51 +0530 Subject: [PATCH 05/23] Respect low priority styles - xplr.config.general.selection.item.style - xplr.config.general.table.row.style - xplr.config.general.table.row.cols[*].style - xplr.config.general.table.header.cols[*].style Ref: https://github.com/sayanarijit/xplr/issues/640 --- src/ui.rs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/ui.rs b/src/ui.rs index 8151fd3..2673c19 100644 --- a/src/ui.rs +++ b/src/ui.rs @@ -669,6 +669,7 @@ fn draw_table( let header_height = app_config.general.table.header.height.unwrap_or(1); let height: usize = (layout_size.height.max(header_height + 2) - (header_height + 2)).into(); + let row_style = app_config.general.table.row.style.to_owned(); let rows = app .directory_buffer @@ -767,17 +768,17 @@ fn draw_table( c.format.as_ref().map(|f| { let out = lua::call(lua, f, v.clone()) .unwrap_or_else(|e| format!("{e:?}")); - string_to_text(out) + (string_to_text(out), c.style.to_owned()) }) }) - .collect::>() + .collect::>() }) .unwrap_or_default() - .iter() - .map(|x| Cell::from(x.to_owned())) + .into_iter() + .map(|(text, style)| Cell::from(text).style(style.into())) .collect::>(); - Row::new(cols) + Row::new(cols).style(row_style.to_owned().into()) }) .collect::>() }) @@ -878,7 +879,10 @@ fn draw_selection( .unwrap_or_else(|| n.absolute_path.clone()); string_to_text(out) }) - .map(ListItem::new) + .map(|i| { + ListItem::new(i) + .style(app.config.general.selection.item.style.to_owned().into()) + }) .collect(); // Selected items From 255517c2a9cef6d8ab0c4562dbdfa5f714eb2fa6 Mon Sep 17 00:00:00 2001 From: Arijit Basu Date: Fri, 7 Jul 2023 15:27:02 +0530 Subject: [PATCH 06/23] Also respect general.table.headers.cols[*].style --- src/ui.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ui.rs b/src/ui.rs index 2673c19..7b44b7d 100644 --- a/src/ui.rs +++ b/src/ui.rs @@ -832,7 +832,10 @@ fn draw_table( .to_owned() .unwrap_or_default() .iter() - .map(|c| Cell::from(c.format.to_owned().unwrap_or_default())) + .map(|c| { + Cell::from(c.format.to_owned().unwrap_or_default()) + .style(c.style.to_owned().into()) + }) .collect::>(), ) .height(header_height) From 313c61db96047d727b70e148a3b2f4e34d129c31 Mon Sep 17 00:00:00 2001 From: Arijit Basu Date: Fri, 7 Jul 2023 18:55:06 +0530 Subject: [PATCH 07/23] Optimize get_current_dir Closes: https://github.com/sayanarijit/xplr/issues/628 --- src/runner.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/runner.rs b/src/runner.rs index 177389f..4b80274 100644 --- a/src/runner.rs +++ b/src/runner.rs @@ -40,15 +40,14 @@ pub fn get_tty() -> Result { // returns physical path. As a workaround, this function tries to use `PWD` // environment variable that is configured by shell. fn get_current_dir() -> Result { - let cur = std::env::current_dir(); if let Ok(pwd) = std::env::var("PWD") { if pwd.is_empty() { - cur + std::env::current_dir() } else { Ok(PathBuf::from(pwd)) } } else { - cur + std::env::current_dir() } } From ad5034226066c81fa5635ba3beb52325b98820c8 Mon Sep 17 00:00:00 2001 From: Arijit Basu Date: Tue, 11 Jul 2023 14:24:15 +0530 Subject: [PATCH 08/23] Fix focus on back --- src/app.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/app.rs b/src/app.rs index 2bdf9eb..f565640 100644 --- a/src/app.rs +++ b/src/app.rs @@ -1042,11 +1042,10 @@ impl App { } fn back(self) -> Result { - if let Some(p) = PathBuf::from(self.pwd.clone()) - .parent() - .and_then(|p| p.to_str()) - { + let pwd = self.pwd.clone(); + if let Some(p) = PathBuf::from(&pwd).parent().and_then(|p| p.to_str()) { self.change_directory(p, true) + .and_then(|a| a.focus_path(&pwd, false)) } else { Ok(self) } From bc7f3cbbcfa427d41a7703c697031acf2f442be2 Mon Sep 17 00:00:00 2001 From: Arijit Basu Date: Tue, 11 Jul 2023 21:10:45 +0530 Subject: [PATCH 09/23] Minor update --- src/app.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app.rs b/src/app.rs index f565640..15ac6af 100644 --- a/src/app.rs +++ b/src/app.rs @@ -1044,8 +1044,8 @@ impl App { fn back(self) -> Result { let pwd = self.pwd.clone(); if let Some(p) = PathBuf::from(&pwd).parent().and_then(|p| p.to_str()) { - self.change_directory(p, true) - .and_then(|a| a.focus_path(&pwd, false)) + self.change_directory(p, false) + .and_then(|a| a.focus_path(&pwd, true)) } else { Ok(self) } From a2fbf759dd8c65118cc95a3545ad71ed9aa2c097 Mon Sep 17 00:00:00 2001 From: Arijit Basu Date: Sun, 16 Jul 2023 01:00:58 +0530 Subject: [PATCH 10/23] Strip --- Cargo.toml | 1 + flake.lock | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 101f350..78d6c97 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -87,5 +87,6 @@ assert_cmd = "2.0.11" lto = true codegen-units = 1 panic = 'abort' +strip = true [features] diff --git a/flake.lock b/flake.lock index 5d441db..10d2cb9 100644 --- a/flake.lock +++ b/flake.lock @@ -87,11 +87,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1684472219, - "narHash": "sha256-cBTmj5Ad5pkU41GkyW/id7/A+s5FUlvj9jr3A35+lIE=", + "lastModified": 1689422397, + "narHash": "sha256-fnopownlSBGTBYxGdTdUPM215yG/UEEj3wgheBLIbHs=", "owner": "nixos", "repo": "nixpkgs", - "rev": "9c82602247a58de900df71fdcc0cfdae2bf29189", + "rev": "45ae0efbbce2aada6d5e8de6ace0c803b08ac9c7", "type": "github" }, "original": { From 2f78691333573464c9d0e0074334c0c91e67f2c7 Mon Sep 17 00:00:00 2001 From: Arijit Basu Date: Sun, 16 Jul 2023 01:18:23 +0530 Subject: [PATCH 11/23] Update/upgrade deps --- Cargo.lock | 452 ++++++++++++++++++++++++++++++----------------------- Cargo.toml | 28 ++-- flake.nix | 1 + src/cli.rs | 4 +- src/ui.rs | 38 ++--- 5 files changed, 291 insertions(+), 232 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 89ceb85..735e9a5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -15,13 +15,19 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67fc08ce920c31afb70f013dcce1bfc3a3195de6a228474e45e1f145b36f8d04" +checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" dependencies = [ "memchr", ] +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + [[package]] name = "android_system_properties" version = "0.1.5" @@ -39,9 +45,9 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" [[package]] name = "ansi-to-tui" -version = "3.0.0" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f3d156989cd98fb225b1a83e82e133e95a151774a420c884f6a65c5f6fb1ee2" +checksum = "0b0e348dcd256ba06d44d5deabc88a7c0e80ee7303158253ca069bcd9e9b7f57" dependencies = [ "nom", "ratatui", @@ -50,9 +56,9 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41ed9a86bf92ae6580e0a31281f65a1b1d867c0cc68d5346e2ae128dddfa6a7d" +checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" [[package]] name = "anyhow" @@ -62,18 +68,18 @@ checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" [[package]] name = "arrayvec" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "assert_cmd" -version = "2.0.11" +version = "2.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86d6b683edf8d1119fe420a94f8a7e389239666aa72e65495d91c00462510151" +checksum = "88903cb14723e4d4003335bb7f8a14f27691649105346a0f0957466c096adfe6" dependencies = [ "anstyle", - "bstr 1.5.0", + "bstr 1.6.0", "doc-comment", "predicates", "predicates-core", @@ -81,17 +87,6 @@ dependencies = [ "wait-timeout", ] -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", -] - [[package]] name = "autocfg" version = "1.1.0" @@ -110,6 +105,12 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" + [[package]] name = "bstr" version = "0.2.17" @@ -121,21 +122,20 @@ dependencies = [ [[package]] name = "bstr" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a246e68bb43f6cd9db24bea052a53e40405417c5fb372e3d1a8a7f770a564ef5" +checksum = "6798148dccfbff0fae41c7574d2fa8f1ef3492fba0face179de5d8d447d67b05" dependencies = [ "memchr", - "once_cell", "regex-automata", "serde", ] [[package]] name = "bumpalo" -version = "3.12.2" +version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c6ed94e98ecff0c12dd1b04c15ec0d7d9458ca8fe806cea6f12954efe74c63b" +checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" [[package]] name = "cassowary" @@ -163,13 +163,13 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.24" +version = "0.4.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" +checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" dependencies = [ + "android-tzdata", "iana-time-zone", "js-sys", - "num-integer", "num-traits", "time 0.1.45", "wasm-bindgen", @@ -205,25 +205,29 @@ dependencies = [ [[package]] name = "clap" -version = "3.2.25" +version = "4.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" +checksum = "3eab9e8ceb9afdade1ab3f0fd8dbce5b1b2f468ad653baf10e771781b2b67b73" dependencies = [ - "bitflags", - "clap_lex", - "indexmap", - "textwrap", + "clap_builder", ] [[package]] -name = "clap_lex" -version = "0.2.4" +name = "clap_builder" +version = "4.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" +checksum = "9f2763db829349bf00cfc06251268865ed4363b93a943174f638daf3ecdba2cd" dependencies = [ - "os_str_bytes", + "anstyle", + "clap_lex", ] +[[package]] +name = "clap_lex" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" + [[package]] name = "core-foundation-sys" version = "0.8.4" @@ -232,19 +236,19 @@ checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "criterion" -version = "0.4.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7c76e09c1aae2bc52b3d2f29e13c6572553b30c4aa1b8a49fd70de6412654cb" +checksum = "f2b12d017a929603d80db1831cd3a24082f8137ce19c69e6447f54f5fc8d692f" dependencies = [ "anes", - "atty", "cast", "ciborium", "clap", "criterion-plot", + "is-terminal", "itertools", - "lazy_static", "num-traits", + "once_cell", "oorandom", "plotters", "rayon", @@ -303,14 +307,14 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.14" +version = "0.9.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695" +checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" dependencies = [ "autocfg", "cfg-if", "crossbeam-utils", - "memoffset 0.8.0", + "memoffset 0.9.0", "scopeguard", ] @@ -326,9 +330,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" dependencies = [ "cfg-if", ] @@ -339,7 +343,7 @@ version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a84cda67535339806297f1b331d6dd6320470d2a0fe65381e79ee9e156dd3d13" dependencies = [ - "bitflags", + "bitflags 1.3.2", "crossterm_winapi", "libc", "mio", @@ -351,9 +355,9 @@ dependencies = [ [[package]] name = "crossterm_winapi" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ae1b35a484aa10e07fe0638d02301c5ad24de82d310ccbd2f3693da5f09bf1c" +checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b" dependencies = [ "winapi", ] @@ -473,15 +477,42 @@ version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + [[package]] name = "erased-serde" -version = "0.3.25" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f2b0c2380453a92ea8b6c8e5f64ecaafccddde8ceab55ff7a8ac1029f894569" +checksum = "f94c0e13118e7d7533271f754a168ae8400e6a1cc043f2bfd53cc7290f1a1de3" dependencies = [ "serde", ] +[[package]] +name = "errno" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +dependencies = [ + "errno-dragonfly", + "libc", + "windows-sys 0.48.0", +] + +[[package]] +name = "errno-dragonfly" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +dependencies = [ + "cc", + "libc", +] + [[package]] name = "fnv" version = "1.0.7" @@ -504,14 +535,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0176e0459c2e4a1fe232f984bca6890e681076abb9934f6cea7c326f3fc47818" dependencies = [ "libc", - "windows-targets 0.48.0", + "windows-targets 0.48.1", ] [[package]] name = "getrandom" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if", "libc", @@ -534,22 +565,16 @@ dependencies = [ ] [[package]] -name = "hermit-abi" -version = "0.1.19" +name = "hashbrown" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] +checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" [[package]] name = "hermit-abi" -version = "0.2.6" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] +checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" [[package]] name = "home" @@ -571,9 +596,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.56" +version = "0.1.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c" +checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -600,15 +625,26 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "indexmap" -version = "1.9.3" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" dependencies = [ - "autocfg", - "hashbrown", + "equivalent", + "hashbrown 0.14.0", "serde", ] +[[package]] +name = "is-terminal" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" +dependencies = [ + "hermit-abi", + "rustix", + "windows-sys 0.48.0", +] + [[package]] name = "itertools" version = "0.10.5" @@ -620,15 +656,15 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.6" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "62b02a5381cc465bd3041d84623d0fa3b66738b52b8e2fc3bab8ad63ab032f4a" [[package]] name = "jf" -version = "0.3.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "379d1f8869705532e4cb467908eccbf83e433b0ac4bb2618cf6217c8303a2798" +checksum = "216281840917ca494664f581363a9c9bdeecaf7d9d7a229cd51d280916a3694f" dependencies = [ "serde_json", "serde_yaml", @@ -636,9 +672,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.63" +version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f37a4a5928311ac501dee68b3c7613a1037d0edb30c8e5427bd832d55d1b790" +checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" dependencies = [ "wasm-bindgen", ] @@ -651,9 +687,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.144" +version = "0.2.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" +checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" [[package]] name = "libm" @@ -661,11 +697,17 @@ version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" +[[package]] +name = "linux-raw-sys" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0" + [[package]] name = "lock_api" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" +checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" dependencies = [ "autocfg", "scopeguard", @@ -673,12 +715,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.17" +version = "0.4.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if", -] +checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" [[package]] name = "lscolors" @@ -686,7 +725,7 @@ version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "18a9df1d1fb6d9e92fa043e9eb9a3ecf6892c7b542bae5137cd1e419e40aa8bf" dependencies = [ - "nu-ansi-term", + "nu-ansi-term 0.47.0", ] [[package]] @@ -724,9 +763,9 @@ dependencies = [ [[package]] name = "memoffset" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" dependencies = [ "autocfg", ] @@ -755,14 +794,14 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "mio" -version = "0.8.6" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" +checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" dependencies = [ "libc", "log", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] @@ -795,7 +834,7 @@ version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cfg-if", "libc", ] @@ -807,7 +846,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f346ff70e7dbfd675fe90590b92d59ef2de15a8779ae305ebcbfd3f0caf59be4" dependencies = [ "autocfg", - "bitflags", + "bitflags 1.3.2", "cfg-if", "libc", "memoffset 0.6.5", @@ -834,13 +873,12 @@ dependencies = [ ] [[package]] -name = "num-integer" -version = "0.1.45" +name = "nu-ansi-term" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +checksum = "db8e83967c32f9210ce85ac7e9c4b731048c1f51c4262e08bad01af30097a424" dependencies = [ - "autocfg", - "num-traits", + "windows-sys 0.48.0", ] [[package]] @@ -854,11 +892,11 @@ dependencies = [ [[package]] name = "num_cpus" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.2.6", + "hermit-abi", "libc", ] @@ -873,9 +911,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.17.1" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "oorandom" @@ -883,12 +921,6 @@ version = "11.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" -[[package]] -name = "os_str_bytes" -version = "6.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ceedf44fb00f2d1984b0bc98102627ce622e083e49a5bacdb3e514fa4238e267" - [[package]] name = "parking_lot" version = "0.12.1" @@ -901,15 +933,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.7" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" +checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.3.5", "smallvec", - "windows-sys 0.45.0", + "windows-targets 0.48.1", ] [[package]] @@ -944,9 +976,9 @@ checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" [[package]] name = "plotters" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2538b639e642295546c50fcd545198c9d64ee2a38620a628724a3b266d5fbf97" +checksum = "d2c224ba00d7cadd4d5c660deaf2098e5e80e07846537c51f9cfa4be50c1fd45" dependencies = [ "num-traits", "plotters-backend", @@ -957,15 +989,15 @@ dependencies = [ [[package]] name = "plotters-backend" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "193228616381fecdc1224c62e96946dfbc73ff4384fba576e052ff8c1bea8142" +checksum = "9e76628b4d3a7581389a35d5b6e2139607ad7c75b17aed325f210aa91f4a9609" [[package]] name = "plotters-svg" -version = "0.3.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a81d2759aae1dae668f783c308bc5c8ebd191ff4184aaa1b37f65a6ae5a56f" +checksum = "38f6d39893cca0701371e3c27294f09797214b86f1fb951b89ade8ec04e2abab" dependencies = [ "plotters-backend", ] @@ -1000,29 +1032,29 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.58" +version = "1.0.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa1fb82fc0c281dd9671101b66b771ebbe1eaf967b96ac8740dcba4b70005ca8" +checksum = "92de25114670a878b1261c79c9f8f729fb97e95bac93f6312f583c60dd6a1dfe" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.27" +version = "1.0.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f4f29d145265ec1c483c7c654450edde0bfe043d3938d6972630663356d9500" +checksum = "5907a1b7c277254a8b15170f6e7c97cfa60ee7872a3217663bb81151e48184bb" dependencies = [ "proc-macro2", ] [[package]] name = "ratatui" -version = "0.20.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcc0d032bccba900ee32151ec0265667535c230169f5a011154cdcd984e16829" +checksum = "ce841e0486e7c2412c3740168ede33adeba8e154a15107b879d8162d77c7174e" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cassowary", "crossterm", "serde", @@ -1058,7 +1090,16 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ - "bitflags", + "bitflags 1.3.2", +] + +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags 1.3.2", ] [[package]] @@ -1068,32 +1109,38 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ "getrandom", - "redox_syscall", + "redox_syscall 0.2.16", "thiserror", ] [[package]] name = "regex" -version = "1.8.1" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af83e617f331cc6ae2da5443c602dfa5af81e517212d9d611a5b3ba1777b5370" +checksum = "b2eae68fc220f7cf2532e4494aded17545fce192d59cd996e0fe7887f4ceb575" dependencies = [ "aho-corasick", "memchr", + "regex-automata", "regex-syntax", ] [[package]] name = "regex-automata" -version = "0.1.10" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +checksum = "39354c10dd07468c2e73926b23bb9c2caca74c5501e38a35da70406f1d923310" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] [[package]] name = "regex-syntax" -version = "0.7.1" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5996294f19bd3aae0453a862ad728f60e6600695733dd5df01da90c54363a3c" +checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" [[package]] name = "rustc-hash" @@ -1101,17 +1148,30 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +[[package]] +name = "rustix" +version = "0.38.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a962918ea88d644592894bc6dc55acc6c0956488adcebbfb6e273506b7fd6e5" +dependencies = [ + "bitflags 2.3.3", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.48.0", +] + [[package]] name = "rustversion" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" +checksum = "dc31bd9b61a32c31f9650d18add92aa83a49ba979c143eefd27fe7177b05bd5f" [[package]] name = "ryu" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "fe232bdf6be8c8de797b22184ee71118d63780ea42ac85b61d1baa6d3b782ae9" [[package]] name = "same-file" @@ -1130,29 +1190,29 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "serde" -version = "1.0.163" +version = "1.0.171" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2" +checksum = "30e27d1e4fd7659406c492fd6cfaf2066ba8773de45ca75e855590f856dc34a9" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.163" +version = "1.0.171" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e" +checksum = "389894603bd18c46fa56231694f8d827779c0951a667087194cf9de94ed24682" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.26", ] [[package]] name = "serde_json" -version = "1.0.96" +version = "1.0.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" +checksum = "b5062a995d481b2308b6064e9af76011f2921c35f97b0468811ed9f6cd91dfed" dependencies = [ "itoa", "ryu", @@ -1161,9 +1221,9 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.9.21" +version = "0.9.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9d684e3ec7de3bf5466b32bd75303ac16f0736426e5a4e0d6e489559ce1249c" +checksum = "452e67b9c20c37fa79df53201dc03839651086ed9bbe92b3ca585ca9fdaa7d85" dependencies = [ "indexmap", "itoa", @@ -1174,9 +1234,9 @@ dependencies = [ [[package]] name = "signal-hook" -version = "0.3.15" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "732768f1176d21d09e076c23a93123d40bba92d50c4058da34d45c8de8e682b9" +checksum = "b824b6e687aff278cdbf3b36f07aa52d4bd4099699324d5da86a2ebce3aa00b3" dependencies = [ "libc", "signal-hook-registry", @@ -1209,7 +1269,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5d28de0a6cb2cdd83a076f1de9d965b973ae08b244df1aa70b432946dda0f32" dependencies = [ "beef", - "bitflags", + "bitflags 1.3.2", "chrono", "crossbeam", "defer-drop", @@ -1220,7 +1280,7 @@ dependencies = [ "nix 0.25.1", "rayon", "regex", - "time 0.3.21", + "time 0.3.23", "timer", "tuikit", "unicode-width", @@ -1229,9 +1289,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" [[package]] name = "smawk" @@ -1268,9 +1328,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.16" +version = "2.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6f671d4b5ffdb8eadec19c0ae67fe2639df8684bd7bc4b83d986b8db549cf01" +checksum = "45c3457aacde3c65315de5031ec191ce46604304d2446e803d71ade03308d970" dependencies = [ "proc-macro2", "quote", @@ -1307,22 +1367,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.40" +version = "1.0.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "a35fc5b8971143ca348fa6df4f024d4d55264f3468c71ad1c2f365b0a4d58c42" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.40" +version = "1.0.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "463fe12d7993d3b327787537ce8dd4dfa058de32fc2b195ef3cde03dc4771e8f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.26", ] [[package]] @@ -1348,9 +1408,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.21" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3403384eaacbca9923fa06940178ac13e4edb725486d70e8e15881d0c836cc" +checksum = "59e399c068f43a5d116fedaf73b203fa4f9c519f17e2b34f63221d3792f81446" dependencies = [ "itoa", "libc", @@ -1368,9 +1428,9 @@ checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" [[package]] name = "time-macros" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "372950940a5f07bf38dbe211d7283c9e6d7327df53794992d293e534c733d09b" +checksum = "96ba15a897f3c86766b757e5ac7221554c6750054d74d5b28844fce5fb36a6c4" dependencies = [ "time-core", ] @@ -1396,9 +1456,9 @@ dependencies = [ [[package]] name = "tui-input" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40419b12b152aaa1a295741903c9b6253e66ef07e0630e2e2503c736f280fdde" +checksum = "9c0f17f46cee09b40dca10deac554e020fc2052c14f20192728cee884288227b" dependencies = [ "crossterm", "serde", @@ -1411,7 +1471,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e19c6ab038babee3d50c8c12ff8b910bdb2196f62278776422f50390d8e53d8" dependencies = [ - "bitflags", + "bitflags 1.3.2", "lazy_static", "log", "nix 0.24.3", @@ -1430,9 +1490,9 @@ dependencies = [ [[package]] name = "unicode-ident" -version = "1.0.8" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" +checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" [[package]] name = "unicode-linebreak" @@ -1440,7 +1500,7 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c5faade31a542b8b35855fff6e8def199853b2da8da256da52f52f1316ee3137" dependencies = [ - "hashbrown", + "hashbrown 0.12.3", "regex", ] @@ -1482,9 +1542,9 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "vte" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aae21c12ad2ec2d168c236f369c38ff332bc1134f7246350dca641437365045" +checksum = "f5022b5fbf9407086c180e9557be968742d839e68346af7792b8592489732197" dependencies = [ "arrayvec", "utf8parse", @@ -1534,9 +1594,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bba0e8cb82ba49ff4e229459ff22a191bbe9a1cb3a341610c9c33efc27ddf73" +checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -1544,24 +1604,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b04bc93f9d6bdee709f6bd2118f57dd6679cf1176a1af464fca3ab0d66d8fb" +checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.26", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14d6b024f1a526bb0234f52840389927257beb670610081360e5a03c5df9c258" +checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1569,28 +1629,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e128beba882dd1eb6200e1dc92ae6c5dbaa4311aa7bb211ca035779e5efc39f8" +checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.26", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed9d5b4305409d1fc9482fee2d7f9bcbf24b3972bf59817ef757e23982242a93" +checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" [[package]] name = "web-sys" -version = "0.3.63" +version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bdd9ef4e984da1187bf8110c5cf5b845fbc87a23602cdf912386a76fcd3a7c2" +checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" dependencies = [ "js-sys", "wasm-bindgen", @@ -1644,7 +1704,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "windows-targets 0.48.0", + "windows-targets 0.48.1", ] [[package]] @@ -1662,7 +1722,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.0", + "windows-targets 0.48.1", ] [[package]] @@ -1682,9 +1742,9 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.0" +version = "0.48.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" dependencies = [ "windows_aarch64_gnullvm 0.48.0", "windows_aarch64_msvc 0.48.0", @@ -1808,7 +1868,7 @@ dependencies = [ "mime_guess", "mlua", "natord", - "nu-ansi-term", + "nu-ansi-term 0.48.0", "path-absolutize", "ratatui", "regex", @@ -1818,7 +1878,7 @@ dependencies = [ "skim", "snailquote", "textwrap", - "time 0.3.21", + "time 0.3.23", "tui-input", "which", "xdg", diff --git a/Cargo.toml b/Cargo.toml index 78d6c97..e6078b7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,24 +22,24 @@ categories = ['command-line-interface', 'command-line-utilities'] include = ['src/**/*', 'docs/en/src/**/*', 'LICENSE', 'README.md'] [dependencies] -libc = "0.2.144" +libc = "0.2.147" humansize = "2.1.3" natord = "1.0.9" anyhow = "1.0.71" -serde_yaml = "0.9.21" +serde_yaml = "0.9.22" crossterm = { version = "0.26.1", features = [], default-features = false } -ansi-to-tui = "3.0.0" -regex = "1.8.1" +ansi-to-tui = "3.1.0" +regex = "1.9.1" gethostname = "0.4.3" -serde_json = "1.0.96" +serde_json = "1.0.102" path-absolutize = "3.1.0" which = "4.4.0" -nu-ansi-term = "0.47.0" +nu-ansi-term = "0.48.0" textwrap = "0.16" snailquote = "0.3.1" skim = { version = "0.10.4", default-features = false } -time = { version = "0.3.21", features = ["serde", "local-offset", "formatting", "macros"] } -jf = "0.3.1" +time = { version = "0.3.23", features = ["serde", "local-offset", "formatting", "macros"] } +jf = "0.6.2" xdg = "2.5.0" home = "0.5.5" @@ -57,18 +57,18 @@ version = "2.0.4" default-features = false [dependencies.tui] -version = "0.20.1" +version = "0.21.0" default-features = false features = ['crossterm', 'serde'] package = 'ratatui' [dependencies.serde] -version = "1.0.163" +version = "1.0.171" features = [] default-features = false [dependencies.indexmap] -version = "1.9.3" +version = "2.0.0" features = ['serde'] [dependencies.mlua] @@ -76,12 +76,12 @@ version = "0.8.9" features = ['luajit', 'vendored', 'serialize', 'send'] [dependencies.tui-input] -version = "0.7.0" +version = "0.7.1" features = ['serde'] [dev-dependencies] -criterion = "0.4.0" -assert_cmd = "2.0.11" +criterion = "0.5.1" +assert_cmd = "2.0.12" [profile.release] lto = true diff --git a/flake.nix b/flake.nix index 5a70e8a..41ab521 100644 --- a/flake.nix +++ b/flake.nix @@ -17,6 +17,7 @@ "i686-linux" "x86_64-darwin" "aarch64-linux" + "aarch64-linux-android" "aarch64-darwin" ]; forAllSystems = f: builtins.listToAttrs (map (name: { inherit name; value = f name; }) systems); diff --git a/src/cli.rs b/src/cli.rs index db695dc..21bb91c 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -206,12 +206,10 @@ pub fn print_msg_in(args: Vec) -> Result<()> { fn fmt_msg_in(args: Vec) -> Result { let msg = match jf::format(args.into_iter().map(Into::into)) { Ok(msg) => msg, - Err(jf::Error::Usage) => { - bail!("usage: xplr -m TEMPLATE [VALUE]... [NAME=VALUE]...") - } Err(jf::Error::Jf(e)) => bail!("xplr -m: {e}"), Err(jf::Error::Json(e)) => bail!("xplr -m: json: {e}"), Err(jf::Error::Yaml(e)) => bail!("xplr -m: yaml: {e}"), + Err(jf::Error::Io(e)) => bail!("xplr -m: io: {e}"), }; // validate diff --git a/src/ui.rs b/src/ui.rs index 7b44b7d..9b2df90 100644 --- a/src/ui.rs +++ b/src/ui.rs @@ -20,7 +20,7 @@ use tui::backend::Backend; use tui::layout::Rect as TuiRect; use tui::layout::{Constraint as TuiConstraint, Direction, Layout as TuiLayout}; use tui::style::{Color, Modifier as TuiModifier, Style as TuiStyle}; -use tui::text::{Span, Spans, Text}; +use tui::text::{Line, Span, Text}; use tui::widgets::{ Block, BorderType as TuiBorderType, Borders as TuiBorders, Cell, List, ListItem, Paragraph, Row, Table, @@ -401,22 +401,22 @@ impl Into for Style { style.add_modifiers.as_ref().map_or(false, f) } - nu_ansi_term::Style { - foreground: self.fg.and_then(convert_color), - background: self.bg.and_then(convert_color), - is_bold: match_modifiers(&self, |m| m.contains(&Modifier::Bold)), - is_dimmed: match_modifiers(&self, |m| m.contains(&Modifier::Dim)), - is_italic: match_modifiers(&self, |m| m.contains(&Modifier::Italic)), - is_underline: match_modifiers(&self, |m| m.contains(&Modifier::Underlined)), - is_blink: match_modifiers(&self, |m| { - m.contains(&Modifier::SlowBlink) || m.contains(&Modifier::RapidBlink) - }), - is_reverse: match_modifiers(&self, |m| m.contains(&Modifier::Reversed)), - is_hidden: match_modifiers(&self, |m| m.contains(&Modifier::Hidden)), - is_strikethrough: match_modifiers(&self, |m| { - m.contains(&Modifier::CrossedOut) - }), - } + let mut style = nu_ansi_term::Style::new(); + style.foreground = self.fg.and_then(convert_color); + style.background = self.bg.and_then(convert_color); + style.is_bold = match_modifiers(&self, |m| m.contains(&Modifier::Bold)); + style.is_dimmed = match_modifiers(&self, |m| m.contains(&Modifier::Dim)); + style.is_italic = match_modifiers(&self, |m| m.contains(&Modifier::Italic)); + style.is_underline = + match_modifiers(&self, |m| m.contains(&Modifier::Underlined)); + style.is_blink = match_modifiers(&self, |m| { + m.contains(&Modifier::SlowBlink) || m.contains(&Modifier::RapidBlink) + }); + style.is_reverse = match_modifiers(&self, |m| m.contains(&Modifier::Reversed)); + style.is_hidden = match_modifiers(&self, |m| m.contains(&Modifier::Hidden)); + style.is_strikethrough = + match_modifiers(&self, |m| m.contains(&Modifier::CrossedOut)); + style } } @@ -980,7 +980,7 @@ fn draw_input_buffer( let width = layout_size.width.max(offset_width) - offset_width; let scroll = input.visual_scroll(width.into()) as u16; - let input_buf = Paragraph::new(Spans::from(vec![ + let input_buf = Paragraph::new(Line::from(vec![ Span::styled( app.input.prompt.to_owned(), app.config.general.prompt.style.to_owned().into(), @@ -1121,7 +1121,7 @@ fn draw_sort_n_filter( format!("({item_count}) ") }; - let p = Paragraph::new(Spans::from(spans)) + let p = Paragraph::new(Line::from(spans)) .block(block(config, format!(" Sort & filter {item_count}"))); f.render_widget(p, layout_size); From 1941355128adc17440f0a8d297b7abf3655219f5 Mon Sep 17 00:00:00 2001 From: Arijit Basu Date: Sun, 16 Jul 2023 13:29:44 +0530 Subject: [PATCH 12/23] Imrove builds - Add more build targets - Allow cross compile (if you have the resources, I don't) - Fix failing nixos tests --- .github/workflows/cd.yml | 101 ++++++++++++---------- .github/workflows/ci.yml | 176 +++++++++++++++++++++------------------ .gitignore | 3 + docs/en/src/sum-type.md | 2 +- flake.lock | 89 +------------------- flake.nix | 38 +++++---- src/path.rs | 15 ++-- 7 files changed, 187 insertions(+), 237 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index ca26841..79461ca 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -12,71 +12,86 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: - - macos-latest - - ubuntu-latest - - ubuntu-20.04 + build: + - macos + - macos-aarch64 + - linux + - linux-musl + - aarch64-linux + # - aarch64-linux-musl + - aarch64-android + # - armv7-linux rust: [stable] include: # See the list: https://github.com/cross-rs/cross - - os: macos-latest - artifact_prefix: macos + - build: macos + os: macos-latest target: x86_64-apple-darwin binary_postfix: "" - - os: ubuntu-latest - artifact_prefix: linux + - build: macos-aarch64 + os: macos-latest + target: aarch64-apple-darwin + binary_postfix: "" + + - build: linux + os: ubuntu-latest target: x86_64-unknown-linux-gnu binary_postfix: "" - - os: ubuntu-20.04 - artifact_prefix: linux-musl + - build: linux-musl + os: ubuntu-latest target: x86_64-unknown-linux-musl binary_postfix: "" - # Will see later + - build: aarch64-linux + os: ubuntu-latest + target: aarch64-unknown-linux-gnu + binary_postfix: "" + + # - build: aarch64-linux-musl + # os: ubuntu-latest + # target: aarch64-unknown-linux-musl + # binary_postfix: "" + + - build: aarch64-android + os: ubuntu-latest + target: aarch64-linux-android + binary_postfix: "" - # - os: ubuntu-latest - # artifact_prefix: x86_64-android - # target: x86_64-linux-android - # binary_postfix: '' - # - # - os: ubuntu-latest - # artifact_prefix: aarch64-android - # target: aarch64-linux-android - # binary_postfix: '' + # - build: armv7-linux + # os: ubuntu-latest + # target: armv7-unknown-linux-gnueabihf + # binary_postfix: "" steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Installing Rust toolchain - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@stable with: toolchain: ${{ matrix.rust }} target: ${{ matrix.target }} - override: true - name: Installing needed macOS dependencies if: matrix.os == 'macos-latest' run: brew install openssl@1.1 - name: Installing needed Ubuntu dependencies - if: matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-20.04' + if: matrix.os == 'ubuntu-latest' run: | sudo apt-get update --fix-missing - sudo apt-get install -y -qq pkg-config libssl-dev libxcb1-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev + sudo apt-get install -y --no-install-recommends liblua5.1-0-dev libluajit-5.1-dev + + - if: matrix.os == 'ubuntu-latest' && contains(matrix.build, 'armv7') + run: sudo apt-get install -y --no-install-recommends gcc-arm-linux-gnueabihf libc-dev-armhf-cross - - name: Checking out sources - uses: actions/checkout@v1 + - if: matrix.os == 'ubuntu-latest' && contains(matrix.build, 'aarch64') + run: sudo apt-get install -y --no-install-recommends gcc-aarch64-linux-gnu libc6-dev-arm64-cross - name: Running cargo build - uses: actions-rs/cargo@v1 - with: - use-cross: true - command: build - toolchain: ${{ matrix.rust }} - args: --locked --release --target ${{ matrix.target }} + run: cargo build --locked --release --target ${{ matrix.target }} - name: Install gpg secret key run: | @@ -89,7 +104,7 @@ jobs: cd target/${{ matrix.target }}/release BINARY_NAME=xplr${{ matrix.binary_postfix }} strip $BINARY_NAME - RELEASE_NAME=xplr-${{ matrix.artifact_prefix }} + RELEASE_NAME=xplr-${{ matrix.build }} tar czvf $RELEASE_NAME.tar.gz $BINARY_NAME shasum -a 256 $RELEASE_NAME.tar.gz > $RELEASE_NAME.sha256 cat <(echo "${{ secrets.GPG_PASS }}") | gpg --pinentry-mode loopback --passphrase-fd 0 --detach-sign --armor $RELEASE_NAME.tar.gz @@ -98,9 +113,9 @@ jobs: uses: softprops/action-gh-release@v1 with: files: | - target/${{ matrix.target }}/release/xplr-${{ matrix.artifact_prefix }}.tar.gz - target/${{ matrix.target }}/release/xplr-${{ matrix.artifact_prefix }}.sha256 - target/${{ matrix.target }}/release/xplr-${{ matrix.artifact_prefix }}.tar.gz.asc + target/${{ matrix.target }}/release/xplr-${{ matrix.build }}.tar.gz + target/${{ matrix.target }}/release/xplr-${{ matrix.build }}.sha256 + target/${{ matrix.target }}/release/xplr-${{ matrix.build }}.tar.gz.asc env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -108,7 +123,7 @@ jobs: name: Publishing GPG signature runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install gpg secret key run: | cat <(echo -e "${{ secrets.GPG_SECRET }}") | gpg --batch --import @@ -133,20 +148,16 @@ jobs: name: Publishing to Cargo runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@stable with: toolchain: stable - override: true - run: | sudo apt-get update --fix-missing sudo apt-get install -y -qq pkg-config libssl-dev libxcb1-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev - - uses: actions-rs/cargo@v1 - with: - command: publish - args: --allow-dirty + - run: cargo publish --allow-dirty env: CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_API_KEY }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8ebe8ed..3062e6a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,130 +11,144 @@ jobs: name: Check runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@stable with: toolchain: stable - profile: minimal - override: true - - uses: actions-rs/cargo@v1 + - run: cargo check + + fmt: + name: Rustfmt + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@stable with: - command: check + toolchain: stable + components: rustfmt + - run: cargo fmt --all -- --check + + clippy: + name: Clippy + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@stable + with: + toolchain: stable + components: clippy + - run: cargo clippy -- -D warnings + + spellcheck: + name: Spellcheck + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: codespell-project/actions-codespell@v1 + with: + ignore_words_file: .codespellignore test: name: Test Suite runs-on: ${{ matrix.os }} + needs: + - check + - fmt + - clippy + - spellcheck strategy: matrix: - os: - - macos-latest - - ubuntu-latest - - ubuntu-20.04 + build: + - macos + - macos-aarch64 + - linux + - linux-musl + - aarch64-linux + # - aarch64-linux-musl + - aarch64-android + # - armv7-linux rust: [stable] include: - - os: macos-latest - artifact_prefix: macos + # See the list: https://github.com/cross-rs/cross + + - build: macos + os: macos-latest target: x86_64-apple-darwin binary_postfix: "" - - os: ubuntu-latest - artifact_prefix: linux + + - build: macos-aarch64 + os: macos-latest + target: aarch64-apple-darwin + binary_postfix: "" + + - build: linux + os: ubuntu-latest target: x86_64-unknown-linux-gnu binary_postfix: "" - - os: ubuntu-20.04 - artifact_prefix: linux-musl + + - build: linux-musl + os: ubuntu-latest target: x86_64-unknown-linux-musl binary_postfix: "" + - build: aarch64-linux + os: ubuntu-latest + target: aarch64-unknown-linux-gnu + binary_postfix: "" + + # - build: aarch64-linux-musl + # os: ubuntu-latest + # target: aarch64-unknown-linux-musl + # binary_postfix: "" + + - build: aarch64-android + os: ubuntu-latest + target: aarch64-linux-android + binary_postfix: "" + + # - build: armv7-linux + # os: ubuntu-latest + # target: armv7-unknown-linux-gnueabihf + # binary_postfix: "" + env: RUST_BACKTRACE: full steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Installing Rust toolchain - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@stable with: toolchain: ${{ matrix.rust }} target: ${{ matrix.target }} - override: true - name: Installing needed macOS dependencies if: matrix.os == 'macos-latest' run: brew install openssl@1.1 - name: Installing needed Ubuntu dependencies - if: matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-20.04' + if: matrix.os == 'ubuntu-latest' run: | sudo apt-get update --fix-missing - sudo apt-get install -y -qq pkg-config libssl-dev libxcb1-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev + sudo apt-get install -y --no-install-recommends liblua5.1-0-dev libluajit-5.1-dev - - name: Build - uses: actions-rs/cargo@v1 - with: - command: build - toolchain: ${{ matrix.rust }} - args: --target ${{ matrix.target }} + - if: matrix.os == 'ubuntu-latest' && contains(matrix.build, 'armv7') + run: sudo apt-get install -y --no-install-recommends gcc-arm-linux-gnueabihf libc-dev-armhf-cross - - name: Test - uses: actions-rs/cargo@v1 - with: - command: test - toolchain: ${{ matrix.rust }} - args: --target ${{ matrix.target }} + - if: matrix.os == 'ubuntu-latest' && contains(matrix.build, 'aarch64') + run: sudo apt-get install -y --no-install-recommends gcc-aarch64-linux-gnu libc6-dev-arm64-cross + - run: cargo build --target ${{ matrix.target }} + - run: cargo test --target ${{ matrix.target }} # bench: # name: Benchmarks # runs-on: ubuntu-latest # steps: - # - uses: actions/checkout@v2 - # - uses: actions-rs/toolchain@v1 + # - uses: actions/checkout@v3 + # - uses: dtolnay/rust-toolchain@stable # with: # toolchain: stable - # profile: minimal - # override: true # # These dependencies are required for `clipboard` # - run: sudo apt-get install -y -qq libxcb1-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev - # - uses: actions-rs/cargo@v1 - # with: - # command: bench - - fmt: - name: Rustfmt - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - override: true - components: rustfmt - - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check - - clippy: - name: Clippy - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - override: true - components: clippy - - uses: actions-rs/cargo@v1 - with: - command: clippy - args: -- -D warnings - - spellcheck: - name: Spellcheck - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: codespell-project/actions-codespell@v1 - with: - ignore_words_file: .codespellignore + # - run: cargo bench diff --git a/.gitignore b/.gitignore index 863591b..555f146 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,6 @@ book/ # direnv .direnv/ + +# nix +result diff --git a/docs/en/src/sum-type.md b/docs/en/src/sum-type.md index 777aa65..cf7f654 100644 --- a/docs/en/src/sum-type.md +++ b/docs/en/src/sum-type.md @@ -89,7 +89,7 @@ have nested types in each branch. --- If you're still confused about something, or if you found an error in this -explaination, feel free to [discuss together][5]. +explanation, feel free to [discuss together][5]. [1]: https://en.wikipedia.org/wiki/Tagged_union [2]: layout.md diff --git a/flake.lock b/flake.lock index 10d2cb9..a06872f 100644 --- a/flake.lock +++ b/flake.lock @@ -1,91 +1,6 @@ { "nodes": { - "flake-compat": { - "flake": false, - "locked": { - "lastModified": 1673956053, - "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "lowdown-src": { - "flake": false, - "locked": { - "lastModified": 1633514407, - "narHash": "sha256-Dw32tiMjdK9t3ETl5fzGrutQTzh2rufgZV4A/BbxuD4=", - "owner": "kristapsdz", - "repo": "lowdown", - "rev": "d2c2b44ff6c27b936ec27358a2653caaef8f73b8", - "type": "github" - }, - "original": { - "owner": "kristapsdz", - "repo": "lowdown", - "type": "github" - } - }, - "nix": { - "inputs": { - "lowdown-src": "lowdown-src", - "nixpkgs": "nixpkgs", - "nixpkgs-regression": "nixpkgs-regression" - }, - "locked": { - "lastModified": 1676545802, - "narHash": "sha256-EK4rZ+Hd5hsvXnzSzk2ikhStJnD63odF7SzsQ8CuSPU=", - "owner": "domenkozar", - "repo": "nix", - "rev": "7c91803598ffbcfe4a55c44ac6d49b2cf07a527f", - "type": "github" - }, - "original": { - "owner": "domenkozar", - "ref": "relaxed-flakes", - "repo": "nix", - "type": "github" - } - }, "nixpkgs": { - "locked": { - "lastModified": 1657693803, - "narHash": "sha256-G++2CJ9u0E7NNTAi9n5G8TdDmGJXcIjkJ3NF8cetQB8=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "365e1b3a859281cf11b94f87231adeabbdd878a2", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-22.05-small", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-regression": { - "locked": { - "lastModified": 1643052045, - "narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", - "type": "github" - } - }, - "nixpkgs_2": { "locked": { "lastModified": 1689422397, "narHash": "sha256-fnopownlSBGTBYxGdTdUPM215yG/UEEj3wgheBLIbHs=", @@ -102,9 +17,7 @@ }, "root": { "inputs": { - "flake-compat": "flake-compat", - "nix": "nix", - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs" } } }, diff --git a/flake.nix b/flake.nix index 41ab521..b3220d1 100644 --- a/flake.nix +++ b/flake.nix @@ -3,31 +3,26 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs"; - nix.url = "github:domenkozar/nix/relaxed-flakes"; - flake-compat = { - url = "github:edolstra/flake-compat"; - flake = false; - }; }; - outputs = { self, nixpkgs, nix, ... }: + outputs = inputs@{ self, nixpkgs, ... }: let - systems = [ - "x86_64-linux" - "i686-linux" - "x86_64-darwin" - "aarch64-linux" - "aarch64-linux-android" - "aarch64-darwin" - ]; - forAllSystems = f: builtins.listToAttrs (map (name: { inherit name; value = f name; }) systems); + lib = nixpkgs.lib; + + darwin = [ "x86_64-darwin" "aarch64-darwin" ]; + linux = [ "x86_64-linux" "x86_64-linux-musl" "aarch64-linux" "aarch64-linux-android" "i86_64-linux" ]; + allSystems = darwin ++ linux; + + forEachSystem = systems: f: lib.genAttrs systems (system: f system); + forAllSystems = forEachSystem allSystems; in { packages = forAllSystems (system: let pkgs = import nixpkgs { inherit system; }; in - { + rec { + # e.g. nix build .#xplr xplr = pkgs.rustPlatform.buildRustPackage rec { name = "xplr"; src = ./.; @@ -35,6 +30,14 @@ lockFile = ./Cargo.lock; }; }; + + # e.g. nix build .#cross.x86_64-linux-musl.xplr --impure + cross = forEachSystem (lib.filter (sys: sys != system) allSystems) (targetSystem: + let + crossPkgs = import nixpkgs { localSystem = system; crossSystem = targetSystem; }; + in + { inherit (crossPkgs) xplr; } + ); } ); defaultPackage = forAllSystems (system: self.packages.${system}.xplr); @@ -55,6 +58,9 @@ default = pkgs.mkShell { RUST_BACKTRACE = 1; + # For cross compilation + NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM = 1; + buildInputs = devRequirements; packages = devRequirements; }; diff --git a/src/path.rs b/src/path.rs index 1f18725..73e2c52 100644 --- a/src/path.rs +++ b/src/path.rs @@ -216,17 +216,20 @@ mod tests { #[test] fn test_relative_to_parent() { - let path = std::env::current_dir().unwrap(); + let path = std::env::current_dir().unwrap().join("docs"); let parent = path.parent().unwrap(); - let relative = relative_to(parent, NONE).unwrap(); + let base = default().with_base(path.to_str().unwrap()); + + let relative = relative_to(parent, Some(&base)).unwrap(); assert_eq!(relative, PathBuf::from("..")); - let relative = relative_to(parent, Some(&default().with_prefix_dots())).unwrap(); + let relative = + relative_to(parent, Some(&base.clone().with_prefix_dots())).unwrap(); assert_eq!(relative, PathBuf::from("..")); let relative = - relative_to(parent, Some(&default().without_suffix_dots())).unwrap(); + relative_to(parent, Some(&base.clone().without_suffix_dots())).unwrap(); assert_eq!( relative, PathBuf::from("../..").join(parent.file_name().unwrap()) @@ -234,12 +237,12 @@ mod tests { let relative = relative_to( parent, - Some(&default().with_prefix_dots().without_suffix_dots()), + Some(&base.clone().with_prefix_dots().without_suffix_dots()), ) .unwrap(); assert_eq!( relative, - PathBuf::from("../..").join(parent.file_name().unwrap()) + PathBuf::from("../..").join(parent.clone().file_name().unwrap()) ); } From 5626422ba406e8c6ce1c1e1c4d38d54992251377 Mon Sep 17 00:00:00 2001 From: Dugan Chen Date: Sun, 16 Jul 2023 19:08:19 -0700 Subject: [PATCH 13/23] Silently fail to 'enter' regular files --- src/app.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app.rs b/src/app.rs index 15ac6af..d6268da 100644 --- a/src/app.rs +++ b/src/app.rs @@ -1035,7 +1035,11 @@ impl App { fn enter(self) -> Result { if let Some(path) = self.focused_node().map(|n| n.absolute_path.clone()) { - self.change_directory(&path, true) + if PathBuf::from(&path).absolutize()?.to_path_buf().is_dir() { + self.change_directory(&path, true) + } else { + Ok(self) + } } else { Ok(self) } From 4aeb3dd7c8d8d4df70249854d34ff690411329b5 Mon Sep 17 00:00:00 2001 From: Dugan Chen Date: Sun, 16 Jul 2023 23:28:24 -0700 Subject: [PATCH 14/23] Use built-in node method --- src/app.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app.rs b/src/app.rs index d6268da..f9e6c4f 100644 --- a/src/app.rs +++ b/src/app.rs @@ -1034,8 +1034,9 @@ impl App { } fn enter(self) -> Result { - if let Some(path) = self.focused_node().map(|n| n.absolute_path.clone()) { - if PathBuf::from(&path).absolutize()?.to_path_buf().is_dir() { + if let Some(node) = self.focused_node() { + if node.is_dir { + let path = node.absolute_path.clone(); self.change_directory(&path, true) } else { Ok(self) From 54d6d1900310f9c9302360eab50a8a52ad53456a Mon Sep 17 00:00:00 2001 From: Arijit Basu Date: Mon, 17 Jul 2023 22:06:54 +0530 Subject: [PATCH 15/23] Also enter symlink dir --- src/app.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app.rs b/src/app.rs index f9e6c4f..898c7d2 100644 --- a/src/app.rs +++ b/src/app.rs @@ -1035,7 +1035,7 @@ impl App { fn enter(self) -> Result { if let Some(node) = self.focused_node() { - if node.is_dir { + if node.is_dir || node.symlink.as_ref().map(|s| s.is_dir).unwrap_or(false) { let path = node.absolute_path.clone(); self.change_directory(&path, true) } else { From 94ba22bbcc194af36490ba38e881e70179717392 Mon Sep 17 00:00:00 2001 From: Arijit Basu Date: Tue, 18 Jul 2023 22:54:05 +0530 Subject: [PATCH 16/23] Upgrade --- Cargo.lock | 84 +++++++++++++++++++++++++++++++++--------------------- Cargo.toml | 8 +++--- src/ui.rs | 1 + 3 files changed, 56 insertions(+), 37 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 735e9a5..8ef9e6f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -62,9 +62,9 @@ checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" [[package]] name = "anyhow" -version = "1.0.71" +version = "1.0.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" +checksum = "3b13c32d80ecc7ab747b80c3784bce54ee8a7a0cc4fbda9bf4cda2cf6fe90854" [[package]] name = "arrayvec" @@ -110,6 +110,9 @@ name = "bitflags" version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" +dependencies = [ + "serde", +] [[package]] name = "bstr" @@ -205,18 +208,18 @@ dependencies = [ [[package]] name = "clap" -version = "4.3.12" +version = "4.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eab9e8ceb9afdade1ab3f0fd8dbce5b1b2f468ad653baf10e771781b2b67b73" +checksum = "8f644d0dac522c8b05ddc39aaaccc5b136d5dc4ff216610c5641e3be5becf56c" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.3.12" +version = "4.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f2763db829349bf00cfc06251268865ed4363b93a943174f638daf3ecdba2cd" +checksum = "af410122b9778e024f9e0fb35682cc09cc3f85cad5e8d3ba8f47a9702df6e73d" dependencies = [ "anstyle", "clap_lex", @@ -485,9 +488,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "erased-serde" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f94c0e13118e7d7533271f754a168ae8400e6a1cc043f2bfd53cc7290f1a1de3" +checksum = "da96524cc884f6558f1769b6c46686af2fe8e8b4cd253bd5a3cdba8181b8e070" dependencies = [ "serde", ] @@ -634,6 +637,12 @@ dependencies = [ "serde", ] +[[package]] +name = "indoc" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c785eefb63ebd0e33416dfcb8d6da0bf27ce752843a45632a67bf10d4d4b5c4" + [[package]] name = "is-terminal" version = "0.4.9" @@ -656,9 +665,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b02a5381cc465bd3041d84623d0fa3b66738b52b8e2fc3bab8ad63ab032f4a" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "jf" @@ -739,11 +748,12 @@ dependencies = [ [[package]] name = "luajit-src" -version = "210.4.5+resty2cf5186" +version = "210.4.6+resty2cf5186" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27b7992a40e602786272d84c6f2beca44a588ededcfd57b48ec6f82008a7cb97" +checksum = "c45ef28e0270605b160214758b57d97cb737b8c5f92885434b17b548fe50f117" dependencies = [ "cc", + "which", ] [[package]] @@ -944,6 +954,12 @@ dependencies = [ "windows-targets 0.48.1", ] +[[package]] +name = "paste" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" + [[package]] name = "path-absolutize" version = "3.1.0" @@ -1032,31 +1048,33 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.65" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92de25114670a878b1261c79c9f8f729fb97e95bac93f6312f583c60dd6a1dfe" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.30" +version = "1.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5907a1b7c277254a8b15170f6e7c97cfa60ee7872a3217663bb81151e48184bb" +checksum = "5fe8a65d69dd0808184ebb5f836ab526bb259db23c657efa38711b1072ee47f0" dependencies = [ "proc-macro2", ] [[package]] name = "ratatui" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce841e0486e7c2412c3740168ede33adeba8e154a15107b879d8162d77c7174e" +checksum = "8285baa38bdc9f879d92c0e37cb562ef38aa3aeefca22b3200186bc39242d3d5" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.3.3", "cassowary", "crossterm", + "indoc", + "paste", "serde", "unicode-segmentation", "unicode-width", @@ -1163,15 +1181,15 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc31bd9b61a32c31f9650d18add92aa83a49ba979c143eefd27fe7177b05bd5f" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "ryu" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe232bdf6be8c8de797b22184ee71118d63780ea42ac85b61d1baa6d3b782ae9" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "same-file" @@ -1184,9 +1202,9 @@ dependencies = [ [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "serde" @@ -1210,9 +1228,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.102" +version = "1.0.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5062a995d481b2308b6064e9af76011f2921c35f97b0468811ed9f6cd91dfed" +checksum = "d03b412469450d4404fe8499a268edd7f8b79fecb074b0d812ad64ca21f4031b" dependencies = [ "itoa", "ryu", @@ -1221,9 +1239,9 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.9.22" +version = "0.9.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "452e67b9c20c37fa79df53201dc03839651086ed9bbe92b3ca585ca9fdaa7d85" +checksum = "bd5f51e3fdb5b9cdd1577e1cb7a733474191b1aca6a72c2e50913241632c1180" dependencies = [ "indexmap", "itoa", @@ -1234,9 +1252,9 @@ dependencies = [ [[package]] name = "signal-hook" -version = "0.3.16" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b824b6e687aff278cdbf3b36f07aa52d4bd4099699324d5da86a2ebce3aa00b3" +checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" dependencies = [ "libc", "signal-hook-registry", @@ -1524,9 +1542,9 @@ checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" [[package]] name = "unsafe-libyaml" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1865806a559042e51ab5414598446a5871b561d21b6764f2eabb0dd481d880a6" +checksum = "f28467d3e1d3c6586d8f25fa243f544f5800fec42d97032474e17222c2b75cfa" [[package]] name = "utf8parse" diff --git a/Cargo.toml b/Cargo.toml index e6078b7..cc99bbb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,13 +25,13 @@ include = ['src/**/*', 'docs/en/src/**/*', 'LICENSE', 'README.md'] libc = "0.2.147" humansize = "2.1.3" natord = "1.0.9" -anyhow = "1.0.71" -serde_yaml = "0.9.22" +anyhow = "1.0.72" +serde_yaml = "0.9.24" crossterm = { version = "0.26.1", features = [], default-features = false } ansi-to-tui = "3.1.0" regex = "1.9.1" gethostname = "0.4.3" -serde_json = "1.0.102" +serde_json = "1.0.103" path-absolutize = "3.1.0" which = "4.4.0" nu-ansi-term = "0.48.0" @@ -57,7 +57,7 @@ version = "2.0.4" default-features = false [dependencies.tui] -version = "0.21.0" +version = "0.22.0" default-features = false features = ['crossterm', 'serde'] package = 'ratatui' diff --git a/src/ui.rs b/src/ui.rs index 9b2df90..0ee812b 100644 --- a/src/ui.rs +++ b/src/ui.rs @@ -329,6 +329,7 @@ impl Into for Style { TuiStyle { fg: self.fg, bg: self.bg, + underline_color: None, add_modifier: TuiModifier::from_bits_truncate(xor(self.add_modifiers)), sub_modifier: TuiModifier::from_bits_truncate(xor(self.sub_modifiers)), } From bf7ae3f74801a7c5692afef9839152a1c00ddac4 Mon Sep 17 00:00:00 2001 From: Arijit Basu Date: Wed, 19 Jul 2023 01:10:20 +0530 Subject: [PATCH 17/23] Give up on the new platforms --- .github/workflows/cd.yml | 38 +++++++++++++++-------------------- .github/workflows/ci.yml | 36 ++++++++++++++------------------- docs/en/src/install.md | 43 ---------------------------------------- 3 files changed, 31 insertions(+), 86 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 79461ca..95f396f 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -19,7 +19,7 @@ jobs: - linux-musl - aarch64-linux # - aarch64-linux-musl - - aarch64-android + # - aarch64-android # - armv7-linux rust: [stable] include: @@ -28,42 +28,36 @@ jobs: - build: macos os: macos-latest target: x86_64-apple-darwin - binary_postfix: "" - build: macos-aarch64 os: macos-latest target: aarch64-apple-darwin - binary_postfix: "" - build: linux os: ubuntu-latest target: x86_64-unknown-linux-gnu - binary_postfix: "" - build: linux-musl os: ubuntu-latest target: x86_64-unknown-linux-musl - binary_postfix: "" - - build: aarch64-linux - os: ubuntu-latest - target: aarch64-unknown-linux-gnu - binary_postfix: "" + # TODO: make these work + # + # - build: aarch64-linux + # os: ubuntu-latest + # target: aarch64-unknown-linux-gnu # - build: aarch64-linux-musl # os: ubuntu-latest # target: aarch64-unknown-linux-musl - # binary_postfix: "" - - build: aarch64-android - os: ubuntu-latest - target: aarch64-linux-android - binary_postfix: "" + # - build: aarch64-android + # os: ubuntu-latest + # target: aarch64-linux-android # - build: armv7-linux # os: ubuntu-latest # target: armv7-unknown-linux-gnueabihf - # binary_postfix: "" steps: - uses: actions/checkout@v3 @@ -82,13 +76,13 @@ jobs: if: matrix.os == 'ubuntu-latest' run: | sudo apt-get update --fix-missing - sudo apt-get install -y --no-install-recommends liblua5.1-0-dev libluajit-5.1-dev - - - if: matrix.os == 'ubuntu-latest' && contains(matrix.build, 'armv7') - run: sudo apt-get install -y --no-install-recommends gcc-arm-linux-gnueabihf libc-dev-armhf-cross + sudo apt-get install -y --no-install-recommends liblua5.1-0-dev libluajit-5.1-dev gcc musl-tools pkg-config - - if: matrix.os == 'ubuntu-latest' && contains(matrix.build, 'aarch64') - run: sudo apt-get install -y --no-install-recommends gcc-aarch64-linux-gnu libc6-dev-arm64-cross + # - if: matrix.os == 'ubuntu-latest' && contains(matrix.build, 'armv7') + # run: sudo apt-get install -y --no-install-recommends gcc-arm-linux-gnueabihf libc-dev-armhf-cross + # + # - if: matrix.os == 'ubuntu-latest' && contains(matrix.build, 'aarch64') + # run: sudo apt-get install -y --no-install-recommends gcc-aarch64-linux-gnu libc6-dev-arm64-cross - name: Running cargo build run: cargo build --locked --release --target ${{ matrix.target }} @@ -102,7 +96,7 @@ jobs: shell: bash run: | cd target/${{ matrix.target }}/release - BINARY_NAME=xplr${{ matrix.binary_postfix }} + BINARY_NAME=xplr strip $BINARY_NAME RELEASE_NAME=xplr-${{ matrix.build }} tar czvf $RELEASE_NAME.tar.gz $BINARY_NAME diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3062e6a..3ac04b6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,7 +65,7 @@ jobs: - linux-musl - aarch64-linux # - aarch64-linux-musl - - aarch64-android + # - aarch64-android # - armv7-linux rust: [stable] include: @@ -74,42 +74,36 @@ jobs: - build: macos os: macos-latest target: x86_64-apple-darwin - binary_postfix: "" - build: macos-aarch64 os: macos-latest target: aarch64-apple-darwin - binary_postfix: "" - build: linux os: ubuntu-latest target: x86_64-unknown-linux-gnu - binary_postfix: "" - build: linux-musl os: ubuntu-latest target: x86_64-unknown-linux-musl - binary_postfix: "" - - build: aarch64-linux - os: ubuntu-latest - target: aarch64-unknown-linux-gnu - binary_postfix: "" + # TODO: make these work + # + # - build: aarch64-linux + # os: ubuntu-latest + # target: aarch64-unknown-linux-gnu # - build: aarch64-linux-musl # os: ubuntu-latest # target: aarch64-unknown-linux-musl - # binary_postfix: "" - - build: aarch64-android - os: ubuntu-latest - target: aarch64-linux-android - binary_postfix: "" + # - build: aarch64-android + # os: ubuntu-latest + # target: aarch64-linux-android # - build: armv7-linux # os: ubuntu-latest # target: armv7-unknown-linux-gnueabihf - # binary_postfix: "" env: RUST_BACKTRACE: full @@ -130,13 +124,13 @@ jobs: if: matrix.os == 'ubuntu-latest' run: | sudo apt-get update --fix-missing - sudo apt-get install -y --no-install-recommends liblua5.1-0-dev libluajit-5.1-dev - - - if: matrix.os == 'ubuntu-latest' && contains(matrix.build, 'armv7') - run: sudo apt-get install -y --no-install-recommends gcc-arm-linux-gnueabihf libc-dev-armhf-cross + sudo apt-get install -y --no-install-recommends liblua5.1-0-dev libluajit-5.1-dev gcc musl-tools pkg-config - - if: matrix.os == 'ubuntu-latest' && contains(matrix.build, 'aarch64') - run: sudo apt-get install -y --no-install-recommends gcc-aarch64-linux-gnu libc6-dev-arm64-cross + # - if: matrix.os == 'ubuntu-latest' && contains(matrix.build, 'armv7') + # run: sudo apt-get install -y --no-install-recommends gcc-arm-linux-gnueabihf libc-dev-armhf-cross + # + # - if: matrix.os == 'ubuntu-latest' && contains(matrix.build, 'aarch64') + # run: sudo apt-get install -y --no-install-recommends gcc-aarch64-linux-gnu libc6-dev-arm64-cross - run: cargo build --target ${{ matrix.target }} - run: cargo test --target ${{ matrix.target }} diff --git a/docs/en/src/install.md b/docs/en/src/install.md index 40f449c..88d93f8 100644 --- a/docs/en/src/install.md +++ b/docs/en/src/install.md @@ -196,47 +196,6 @@ cargo build --locked --release --bin xplr sudo cp target/release/xplr /usr/local/bin/ ``` -## Android - -### [Termux][23] - -[![xplr-termuxfd3c398d3cf4bcbc.md.jpg][24]][25] - -> Please note that xplr isn't heavily tested on Termux, hence things might -> need a little tweaking and fixing for a smooth usage experience. - -- Install build dependencies - - ```bash - pkg install rustc cargo make - ``` - -- Install `xplr` - - ```bash - cargo install --locked --force xplr - ``` - -- Setup storage - - ```bash - termux-setup-storage - ``` - -- Setup config and runtime dir - - ```bash - export XDG_CONFIG_HOME="$PWD/storage/.config" - export XDG_RUNTIME_DIR="$PWD/storage/run" - - mkdir -p "$XDG_CONFIG_HOME" "$XDG_RUNTIME_DIR" - ``` - -- Run - ```bash - ~/.cargo/bin/xplr - ``` - [1]: #direct-download [2]: #from-cratesio [3]: #build-from-source @@ -259,8 +218,6 @@ sudo cp target/release/xplr /usr/local/bin/ [20]: https://gcc.gnu.org/ [21]: https://www.gnu.org/software/make/ [22]: https://git-scm.com/ -[23]: https://termux.com/ -[24]: https://s3.gifyu.com/images/xplr-termuxfd3c398d3cf4bcbc.md.jpg [25]: https://gifyu.com/image/tF2D [26]: https://github.com/sayanarijit/xplr/releases/latest/download/xplr-linux-musl.tar.gz [27]: https://pkgs.alpinelinux.org/packages?name=xplr From 56472998f5728bc1e3fb4dd23f248079bc28b26c Mon Sep 17 00:00:00 2001 From: Arijit Basu Date: Wed, 19 Jul 2023 03:04:44 +0530 Subject: [PATCH 18/23] Don't give up yet --- .cargo/config | 10 ++++++++ .github/workflows/cd.yml | 46 ++++++++++++++++-------------------- .github/workflows/ci.yml | 50 ++++++++++++++++++---------------------- 3 files changed, 53 insertions(+), 53 deletions(-) diff --git a/.cargo/config b/.cargo/config index e82ae86..0a661cc 100644 --- a/.cargo/config +++ b/.cargo/config @@ -1,4 +1,14 @@ # Why dynamic linking? # See https://github.com/sayanarijit/xplr/issues/309 + [target.x86_64-unknown-linux-gnu] rustflags = ["-C", "link-args=-rdynamic"] + +[target.aarch64-unknown-linux-gnu] +rustflags = ["-C", "linker=aarch64-linux-gnu-gcc", "-C", "link-args=-rdynamic"] + +[target.aarch64-linux-android] +rustflags = ["-C", "linker=aarch64-linux-android-clang", "-C", "link-args=-rdynamic"] + +[target.arm-unknown-linux-gnueabihf] +rustflags = ["-C", "linker=arm-linux-gnueabihf-gcc", "-C", "link-args=-rdynamic"] diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 95f396f..e5d37d3 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -17,10 +17,8 @@ jobs: - macos-aarch64 - linux - linux-musl - - aarch64-linux - # - aarch64-linux-musl - # - aarch64-android - # - armv7-linux + - linux-aarch64 + - linux-arm rust: [stable] include: # See the list: https://github.com/cross-rs/cross @@ -41,23 +39,13 @@ jobs: os: ubuntu-latest target: x86_64-unknown-linux-musl - # TODO: make these work - # - # - build: aarch64-linux - # os: ubuntu-latest - # target: aarch64-unknown-linux-gnu - - # - build: aarch64-linux-musl - # os: ubuntu-latest - # target: aarch64-unknown-linux-musl - - # - build: aarch64-android - # os: ubuntu-latest - # target: aarch64-linux-android + - build: linux-aarch64 + os: ubuntu-latest + target: aarch64-unknown-linux-gnu - # - build: armv7-linux - # os: ubuntu-latest - # target: armv7-unknown-linux-gnueabihf + - build: linux-arm + os: ubuntu-latest + target: arm-unknown-linux-gnueabihf steps: - uses: actions/checkout@v3 @@ -76,13 +64,19 @@ jobs: if: matrix.os == 'ubuntu-latest' run: | sudo apt-get update --fix-missing - sudo apt-get install -y --no-install-recommends liblua5.1-0-dev libluajit-5.1-dev gcc musl-tools pkg-config + sudo apt-get install -y --no-install-recommends liblua5.1-0-dev libluajit-5.1-dev gcc pkg-config curl git make ca-certificates - # - if: matrix.os == 'ubuntu-latest' && contains(matrix.build, 'armv7') - # run: sudo apt-get install -y --no-install-recommends gcc-arm-linux-gnueabihf libc-dev-armhf-cross - # - # - if: matrix.os == 'ubuntu-latest' && contains(matrix.build, 'aarch64') - # run: sudo apt-get install -y --no-install-recommends gcc-aarch64-linux-gnu libc6-dev-arm64-cross + - if: matrix.build == 'linux-musl' + run: sudo apt-get install -y musl-tools + + - if: matrix.build == 'linux-aarch64' + run: sudo apt-get install -y gcc-aarch64-linux-gnu + + - if: matrix.build == 'linux-arm' + run: | + sudo apt-get install -y gcc-multilib + sudo apt-get install -y gcc-arm-linux-gnueabihf + sudo ln -s /usr/include/asm-generic/ /usr/include/asm - name: Running cargo build run: cargo build --locked --release --target ${{ matrix.target }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3ac04b6..9c69dc4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,10 +63,8 @@ jobs: - macos-aarch64 - linux - linux-musl - - aarch64-linux - # - aarch64-linux-musl - # - aarch64-android - # - armv7-linux + - linux-aarch64 + - linux-arm rust: [stable] include: # See the list: https://github.com/cross-rs/cross @@ -87,23 +85,13 @@ jobs: os: ubuntu-latest target: x86_64-unknown-linux-musl - # TODO: make these work - # - # - build: aarch64-linux - # os: ubuntu-latest - # target: aarch64-unknown-linux-gnu - - # - build: aarch64-linux-musl - # os: ubuntu-latest - # target: aarch64-unknown-linux-musl - - # - build: aarch64-android - # os: ubuntu-latest - # target: aarch64-linux-android + - build: linux-aarch64 + os: ubuntu-latest + target: aarch64-unknown-linux-gnu - # - build: armv7-linux - # os: ubuntu-latest - # target: armv7-unknown-linux-gnueabihf + - build: linux-arm + os: ubuntu-latest + target: arm-unknown-linux-gnueabihf env: RUST_BACKTRACE: full @@ -124,16 +112,24 @@ jobs: if: matrix.os == 'ubuntu-latest' run: | sudo apt-get update --fix-missing - sudo apt-get install -y --no-install-recommends liblua5.1-0-dev libluajit-5.1-dev gcc musl-tools pkg-config + sudo apt-get install -y --no-install-recommends liblua5.1-0-dev libluajit-5.1-dev gcc pkg-config curl git make ca-certificates - # - if: matrix.os == 'ubuntu-latest' && contains(matrix.build, 'armv7') - # run: sudo apt-get install -y --no-install-recommends gcc-arm-linux-gnueabihf libc-dev-armhf-cross - # - # - if: matrix.os == 'ubuntu-latest' && contains(matrix.build, 'aarch64') - # run: sudo apt-get install -y --no-install-recommends gcc-aarch64-linux-gnu libc6-dev-arm64-cross + - if: matrix.build == 'linux-musl' + run: sudo apt-get install -y musl-tools + + - if: matrix.build == 'linux-aarch64' + run: sudo apt-get install -y gcc-aarch64-linux-gnu + + - if: matrix.build == 'linux-arm' + run: | + sudo apt-get install -y gcc-multilib + sudo apt-get install -y gcc-arm-linux-gnueabihf + sudo ln -s /usr/include/asm-generic/ /usr/include/asm - run: cargo build --target ${{ matrix.target }} - - run: cargo test --target ${{ matrix.target }} + + - if: matrix.build == 'macos' || matrix.build == 'linux' + run: cargo test --target ${{ matrix.target }} # bench: # name: Benchmarks From 9a7ff5846d5eed5fbcefd6fea3a48dfc486d15ba Mon Sep 17 00:00:00 2001 From: Arijit Basu Date: Fri, 21 Jul 2023 21:54:07 +0530 Subject: [PATCH 19/23] Fix android build (#657) * Fix android build Ref: https://github.com/khvzak/mlua/issues/267#issuecomment-1644559018 * Update docs * Fix typos by cheating a bit * Instruction first --- .cargo/config | 2 +- docs/en/src/general-config.md | 4 + docs/en/src/install.md | 19 +++++ docs/en/src/layout.md | 142 +++++++++++++++++++++++++++++++--- docs/en/src/layouts.md | 21 ++++- docs/en/src/sum-type.md | 54 +++++++------ src/init.lua | 33 +++++++- 7 files changed, 232 insertions(+), 43 deletions(-) diff --git a/.cargo/config b/.cargo/config index 0a661cc..bcfce47 100644 --- a/.cargo/config +++ b/.cargo/config @@ -8,7 +8,7 @@ rustflags = ["-C", "link-args=-rdynamic"] rustflags = ["-C", "linker=aarch64-linux-gnu-gcc", "-C", "link-args=-rdynamic"] [target.aarch64-linux-android] -rustflags = ["-C", "linker=aarch64-linux-android-clang", "-C", "link-args=-rdynamic"] +rustflags = ["-C", "linker=aarch64-linux-android-clang", "-C", "link-args=-rdynamic", "-C", "default-linker-libraries"] [target.arm-unknown-linux-gnueabihf] rustflags = ["-C", "linker=arm-linux-gnueabihf-gcc", "-C", "link-args=-rdynamic"] diff --git a/docs/en/src/general-config.md b/docs/en/src/general-config.md index 8b09e11..75fa861 100644 --- a/docs/en/src/general-config.md +++ b/docs/en/src/general-config.md @@ -587,12 +587,16 @@ Type: nullable list of [Node Sorter](https://xplr.dev/en/sorting#node-sorter-app #### xplr.config.general.initial_mode The name of one of the modes to use when xplr loads. +This isn't the default mode. To modify the default mode, overwrite +[xplr.config.modes.builtin.default](https://xplr.dev/en/modes#xplrconfigmodesbuiltindefault). Type: nullable string #### xplr.config.general.initial_layout The name of one of the layouts to use when xplr loads. +This isn't the default layout. To modify the default layout, overwrite +[xplr.config.layouts.builtin.default](https://xplr.dev/en/layouts#xplrconfiglayoutsbuiltindefault). Type: nullable string diff --git a/docs/en/src/install.md b/docs/en/src/install.md index 88d93f8..c32f3aa 100644 --- a/docs/en/src/install.md +++ b/docs/en/src/install.md @@ -196,6 +196,23 @@ cargo build --locked --release --bin xplr sudo cp target/release/xplr /usr/local/bin/ ``` +## Android + +### [Termux][24] + +```bash +pkg install rust make binutils +cargo install --locked xplr + +# Run +~/.cargo/bin/xplr +``` + +> Please note that xplr isn't heavily tested on Termux, hence things might need +> a little tweaking and fixing for a smooth user experience. + +![termux demo][23] + [1]: #direct-download [2]: #from-cratesio [3]: #build-from-source @@ -218,6 +235,8 @@ sudo cp target/release/xplr /usr/local/bin/ [20]: https://gcc.gnu.org/ [21]: https://www.gnu.org/software/make/ [22]: https://git-scm.com/ +[23]: https://github.com/sayanarijit/xplr/assets/11632726/3b61e8c8-76f0-48e8-8734-50e9e7e495b7 +[24]: https://termux.dev/ [25]: https://gifyu.com/image/tF2D [26]: https://github.com/sayanarijit/xplr/releases/latest/download/xplr-linux-musl.tar.gz [27]: https://pkgs.alpinelinux.org/packages?name=xplr diff --git a/docs/en/src/layout.md b/docs/en/src/layout.md index 2a74878..ec603a8 100644 --- a/docs/en/src/layout.md +++ b/docs/en/src/layout.md @@ -2,15 +2,13 @@ #### Example: Defining Custom Layout -[![layout.png][23]][24] - ```lua xplr.config.layouts.builtin.default = { Horizontal = { config = { margin = 1, - horizontal_margin = 2, - vertical_margin = 3, + horizontal_margin = 1, + vertical_margin = 1, constraints = { { Percentage = 50 }, { Percentage = 50 }, @@ -24,6 +22,21 @@ xplr.config.layouts.builtin.default = { } ``` +Result: + +``` + ╭ /home ─────────────╮╭ Help [default] ────╮ + │ ╭─── path ││. show hidden │ + │ ├▸[ð Desktop/] ││/ search │ + │ ├ ð Documents/ ││: action │ + │ ├ ð Downloads/ ││? global help │ + │ ├ ð GitHub/ ││G go to bottom │ + │ ├ ð Music/ ││V select/unselect│ + │ ├ ð Pictures/ ││ctrl duplicate as │ + │ ├ ð Public/ ││ctrl next visit │ + ╰────────────────────╯╰────────────────────╯ +``` + A layout is a [sum type][56] can be one of the following: - [Nothing][8] @@ -86,7 +99,7 @@ Type: { Static = [Custom Panel][27] } This is a custom layout to render dynamic content using a function defined in [xplr.fn][28] that takes [Content Renderer Argument][36] and returns [Custom Panel][27]. -Type: { Dynamic = [Content Renderer][35] } +Type: { Dynamic = "[Content Renderer][35]" } ### Horizontal @@ -97,7 +110,7 @@ It contains the following information: - [config][15] - [splits][17] -Type: { Horizontal = { config = [config][15], splits = [splits][17] } +Type: { Vertical = { config = [Layout Config][15], splits = { [Layout][17], ... } } ### Vertical @@ -108,7 +121,7 @@ It contains the following information: - [config][15] - [splits][17] -Type: { Vertical = { config = [config][15], splits = [splits][17] } +Type: { Vertical = { config = [Layout Config][15], splits = { [Layout][17], ... } } ## Layout Config @@ -200,6 +213,16 @@ xplr.config.layouts.builtin.default = { } ``` +Result: + +``` +╭ custom title ────────╮ +│custom body │ +│ │ +│ │ +╰──────────────────────╯ +``` + #### Example: Render a custom dynamic paragraph ```lua @@ -215,6 +238,23 @@ xplr.fn.custom.render_layout = function(ctx) end ``` +Result: + +``` +╭/home/sayanarijit───────────────────────────╮ +│mime_essence: inode/directory │ +│relative_path: Desktop │ +│is_symlink: false │ +│is_readonly: false │ +│parent: /home/sayanarijit │ +│absolute_path: /home/sayanarijit/Desktop │ +│is_broken: false │ +│created: 1668087850396758714 │ +│size: 4096 │ +│gid: 100 │ +╰────────────────────────────────────────────╯ +``` + ### CustomList A list to render. It contains the following fields: @@ -235,6 +275,17 @@ xplr.config.layouts.builtin.default = { } ``` +Result: + +``` +╭ custom title ─────────────╮ +│1 │ +│2 │ +│3 │ +│ │ +╰───────────────────────────╯ +``` + #### Example: Render a custom dynamic list ```lua @@ -254,6 +305,18 @@ xplr.fn.custom.render_layout = function(ctx) end ``` +Result: + +``` +╭/home/sayanarijit──────────╮ +│Desktop │ +│0.21.2 │ +│17336 │ +│ │ +│ │ +╰───────────────────────────╯ +``` + ## CustomTable A custom table to render. It contains the following fields: @@ -283,6 +346,18 @@ xplr.config.layouts.builtin.default = { } ``` +Result: + +``` +╭ custom title ────────────────────╮ +│a b │ +│c d │ +│ │ +│ │ +│ │ +╰──────────────────────────────────╯ +``` + #### Example: Render a custom dynamic table ```lua @@ -309,6 +384,23 @@ xplr.fn.custom.render_layout = function(ctx) end ``` +Result: + +``` +╭/home/sayanarijit───────────────────────────╮ +│ │ +│Layout height 12 │ +│Layout width 46 │ +│ │ +│Screen height 12 │ +│Screen width 46 │ +│ │ +│ │ +│ │ +│ │ +╰────────────────────────────────────────────╯ +``` + ### CustomLayout A whole custom layout to render. It doesn't make sense to use it as a @@ -347,6 +439,40 @@ xplr.fn.custom.render_layout = function(ctx) end ``` +Result: + +``` +╭─────────────────────╮╭─────────────────────╮ +│Try your luck... ││Press ctrl-r │ +│ ││ │ +│ ││ │ +│ ││ │ +│ ││ │ +│ ││ │ +│ ││ │ +│ ││ │ +│ ││ │ +│ ││ │ +╰─────────────────────╯╰─────────────────────╯ +``` + +Or + +``` +╭────────────────────────────────────────────╮ +│Try your luck... │ +│ │ +│ │ +│ │ +╰────────────────────────────────────────────╯ +╭────────────────────────────────────────────╮ +│Press ctrl-r │ +│ │ +│ │ +│ │ +╰────────────────────────────────────────────╯ +``` + ## Panel UI Config It contains the following optional fields: @@ -429,8 +555,6 @@ Hence, only the following fields are available. [20]: #vertical_margin [21]: #constraints [22]: #constraint -[23]: https://s6.gifyu.com/images/layout.png -[24]: https://gifyu.com/image/1X38 [25]: #static [26]: #dynamic [27]: #custom-panel diff --git a/docs/en/src/layouts.md b/docs/en/src/layouts.md index 1650da6..9ee0635 100644 --- a/docs/en/src/layouts.md +++ b/docs/en/src/layouts.md @@ -12,15 +12,13 @@ You can add new panels in `xplr.config.layouts.custom`. ##### Example: Defining Custom Layout -![demo](https://s6.gifyu.com/images/layout.png) - ```lua xplr.config.layouts.builtin.default = { Horizontal = { config = { margin = 1, - horizontal_margin = 2, - vertical_margin = 3, + horizontal_margin = 1, + vertical_margin = 1, constraints = { { Percentage = 50 }, { Percentage = 50 }, @@ -34,6 +32,21 @@ xplr.config.layouts.builtin.default = { } ``` +Result: + +``` +╭ /home ─────────────╮╭ Help [default] ────╮ +│ ╭─── path ││. show hidden │ +│ ├▸[ð Desktop/] ││/ search │ +│ ├ ð Documents/ ││: action │ +│ ├ ð Downloads/ ││? global help │ +│ ├ ð GitHub/ ││G go to bottom │ +│ ├ ð Music/ ││V select/unselect│ +│ ├ ð Pictures/ ││ctrl duplicate as │ +│ ├ ð Public/ ││ctrl next visit │ +╰────────────────────╯╰────────────────────╯ +``` + #### xplr.config.layouts.builtin.default The default layout diff --git a/docs/en/src/sum-type.md b/docs/en/src/sum-type.md index cf7f654..26e93dd 100644 --- a/docs/en/src/sum-type.md +++ b/docs/en/src/sum-type.md @@ -29,23 +29,23 @@ them, but only a few modern programming languages allow nesting other types into a sum type. ```rust -enum Result { - Ok, - Err, +enum Color { + Red, + Green, } ``` -Here, `Result` can be one of two possible set of values: `Ok` and `Err`, just -like `boolean`, but unlike `boolean`, being tagged allows `Result` to have more +Here, `Color` can be one of two possible set of values: `Red` and `Green`, just +like `boolean`, but unlike `boolean`, being tagged allows `Color` to have more than two variants if required, by changing the definition. e.g. ```rust -enum Result { - Ok, - Err, - Pending, +enum Color { + Red, + Green, + Blue, } ``` @@ -53,35 +53,39 @@ We'd document it here as: > Result is a sum type that can be one of the following: > -> - "Ok" -> - "Err" -> - "Pending" +> - "Red" +> - "Green" +> - "Blue" But some languages (like Rust, Haskell, Elm etc.) go even further, allowing us to associate each branch of the enum with further nested types like: ```rust -enum Result { - Ok(bool), - Err(Error), - Pending, +enum Layout { + Table, + HelpMenu, + Horizontal { + config: LayoutConfig, // A product type (similar to class/struct) + splits: Vec // A list of "Layout"s (i.e. list of sum types) + }, } ``` -Here, as we can see, unlike the first example, some of `Result`'s possible -variants can have further nested types associated with them. Note that `Error` -here can be either a sum type (e.g. enum), or a product type (e.g. -class/struct), but whatever it is, it will only exist when `Result` is `Err`. +Here, as we can see, unlike the first example, some of `Layout`'s possible +variants can have further nested types associated with them. Note that +`Horizontal` here can have a sum type (e.g. enum), or a product type (e.g. +class/struct), or both (any number of them actually) nested in it. But the +nested values will only exist when `Layout` is `Horizontal`. We'd document it here as: -> Result is a sum type that can be one of the following: +> Layout is a sum type that can be one of the following: > -> - { Ok = bool } -> - { Err = Error } -> - "Pending" +> - "Table" +> - "HelpMenu" +> - { Horizontal = { config = Layout Config, splits = { Layout, ... } } -And then we'd go on documenting whatever `Error` is. +And then we'd go on documenting whatever `Layout Config` is. So, there you go. This is exactly what sum types are - glorified enums that can have nested types in each branch. diff --git a/src/init.lua b/src/init.lua index 21228bf..296e62a 100644 --- a/src/init.lua +++ b/src/init.lua @@ -680,11 +680,15 @@ xplr.config.general.initial_sorting = { } -- The name of one of the modes to use when xplr loads. +-- This isn't the default mode. To modify the default mode, overwrite +-- [xplr.config.modes.builtin.default](https://xplr.dev/en/modes#xplrconfigmodesbuiltindefault). -- -- Type: nullable string xplr.config.general.initial_mode = "default" -- The name of one of the layouts to use when xplr loads. +-- This isn't the default layout. To modify the default layout, overwrite +-- [xplr.config.layouts.builtin.default](https://xplr.dev/en/layouts#xplrconfiglayoutsbuiltindefault). -- -- Type: nullable string xplr.config.general.initial_layout = "default" @@ -852,15 +856,13 @@ xplr.config.node_types.special = {} -- -- ##### Example: Defining Custom Layout -- --- ![demo](https://s6.gifyu.com/images/layout.png) --- -- ```lua -- xplr.config.layouts.builtin.default = { -- Horizontal = { -- config = { -- margin = 1, --- horizontal_margin = 2, --- vertical_margin = 3, +-- horizontal_margin = 1, +-- vertical_margin = 1, -- constraints = { -- { Percentage = 50 }, -- { Percentage = 50 }, @@ -873,6 +875,21 @@ xplr.config.node_types.special = {} -- } -- } -- ``` +-- +-- Result: +-- +-- ``` +-- ╭ /home ─────────────╮╭ Help [default] ────╮ +-- │ ╭─── path ││. show hidden │ +-- │ ├▸[ð Desktop/] ││/ search │ +-- │ ├ ð Documents/ ││: action │ +-- │ ├ ð Downloads/ ││? global help │ +-- │ ├ ð GitHub/ ││G go to bottom │ +-- │ ├ ð Music/ ││V select/unselect│ +-- │ ├ ð Pictures/ ││ctrl duplicate as │ +-- │ ├ ð Public/ ││ctrl next visit │ +-- ╰────────────────────╯╰────────────────────╯ +-- ``` -- The default layout -- @@ -3077,6 +3094,14 @@ xplr.fn.custom = {} -- { LogSuccess = "Switched layout" }, -- { CallLuaSilently = "custom.some_plugin_with_hooks.on_layout_switch" }, -- } +-- +-- -- Add messages to send when the selection changes +-- -- +-- -- Type: list of [Message](https://xplr.dev/en/message#message)s +-- on_selection_change = { +-- { LogSuccess = "Selection changed" }, +-- { CallLuaSilently = "custom.some_plugin_with_hooks.on_selection_change" }, +-- } -- } -- ``` From eeb7b5d684347d800139bd5970bbfb5dd0984aaa Mon Sep 17 00:00:00 2001 From: Arijit Basu Date: Thu, 27 Jul 2023 10:37:05 +0530 Subject: [PATCH 20/23] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index fccbb7f..2d42ca6 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,8 @@ integration][15], enabling you to achieve insane terminal productivity. - [[Article] What is a TUI file explorer & why would you need one? ~ xplr.stck.me](https://xplr.stck.me/post/25252/What-is-a-TUI-file-explorer-why-would-you-need-one) +- [[Article] FOSSPicks - Linux Magazine](https://www.linux-magazine.com/Issues/2022/258/FOSSPicks/(offset)/6) + ## Packaging Package maintainers please refer to the [RELEASE.md](./RELEASE.md). From 6df168f8c1243664ef83e76ff72a06de2ca5c20f Mon Sep 17 00:00:00 2001 From: Lewis Cook Date: Sun, 30 Jul 2023 01:56:44 +0100 Subject: [PATCH 21/23] init: Fix error upon deleting file on non-GNU systems --- src/init.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/init.lua b/src/init.lua index 296e62a..c3245b9 100644 --- a/src/init.lua +++ b/src/init.lua @@ -1995,7 +1995,9 @@ xplr.config.modes.builtin.delete = { messages = { { BashExec0 = [===[ - cat "${XPLR_PIPE_RESULT_OUT:?}" | xargs -0 printf '%q\n' + while IFS= read -r -d '' PTH; do + printf '%q\n' "$PTH" + done < "${XPLR_PIPE_RESULT_OUT:?}" echo read -p "Permanently delete these files? [Y/n]: " ANS [ "${ANS:-Y}" = "Y" ] || [ "$ANS" = "y" ] || exit 0 @@ -2023,7 +2025,9 @@ xplr.config.modes.builtin.delete = { messages = { { BashExec0 = [===[ - cat "${XPLR_PIPE_RESULT_OUT:?}" | xargs -0 printf '%q\n' + while IFS= read -r -d '' PTH; do + printf '%q\n' "$PTH" + done < "${XPLR_PIPE_RESULT_OUT:?}" echo read -p "Permanently delete these files? [Y/n]: " ANS [ "${ANS:-Y}" = "Y" ] || [ "$ANS" = "y" ] || exit 0 From 4a3f18100dc287785c33a8e76e6019f7f4753da4 Mon Sep 17 00:00:00 2001 From: Arijit Basu Date: Mon, 7 Aug 2023 23:19:46 +0530 Subject: [PATCH 22/23] Display current mode help menu on top Also, add global key binding f1. Also, update deps. Closes: https://github.com/sayanarijit/xplr/issues/655 --- Cargo.lock | 293 +++++++++++++++------------------------- Cargo.toml | 20 +-- docs/landing/index.html | 2 +- src/app.rs | 6 +- src/init.lua | 24 ++-- 5 files changed, 138 insertions(+), 207 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8ef9e6f..1a68875 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,17 +2,6 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "ahash" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" -dependencies = [ - "getrandom", - "once_cell", - "version_check", -] - [[package]] name = "aho-corasick" version = "1.0.2" @@ -154,9 +143,12 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.0.79" +version = "1.0.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "305fe645edc1442a0fa8b6726ba61d422798d37a52e12eaecf4b022ebbb88f01" +dependencies = [ + "libc", +] [[package]] name = "cfg-if" @@ -208,18 +200,18 @@ dependencies = [ [[package]] name = "clap" -version = "4.3.15" +version = "4.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f644d0dac522c8b05ddc39aaaccc5b136d5dc4ff216610c5641e3be5becf56c" +checksum = "5fd304a20bff958a57f04c4e96a2e7594cc4490a0e809cbd48bb6437edaa452d" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.3.15" +version = "4.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af410122b9778e024f9e0fb35682cc09cc3f85cad5e8d3ba8f47a9702df6e73d" +checksum = "01c6a3f08f1fe5662a35cfe393aec09c4df95f60ee93b7556505260f75eee9e1" dependencies = [ "anstyle", "clap_lex", @@ -356,6 +348,22 @@ dependencies = [ "winapi", ] +[[package]] +name = "crossterm" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f476fe445d41c9e991fd07515a6f463074b782242ccf4a5b7b1d1012e70824df" +dependencies = [ + "bitflags 2.3.3", + "crossterm_winapi", + "libc", + "mio", + "parking_lot", + "signal-hook", + "signal-hook-mio", + "winapi", +] + [[package]] name = "crossterm_winapi" version = "0.9.1" @@ -410,6 +418,15 @@ dependencies = [ "once_cell", ] +[[package]] +name = "deranged" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7684a49fb1af197853ef7b2ee694bc1f5b4179556f1e5710e1760c5db6f5e929" +dependencies = [ + "serde", +] + [[package]] name = "derive_builder" version = "0.11.2" @@ -476,9 +493,9 @@ checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" [[package]] name = "either" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "equivalent" @@ -497,13 +514,13 @@ dependencies = [ [[package]] name = "errno" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +checksum = "6b30f669a7961ef1631673d2766cc92f52d64f7ef354d4fe0ddfd30ed52f0f4f" dependencies = [ "errno-dragonfly", "libc", - "windows-sys 0.48.0", + "windows-sys", ] [[package]] @@ -538,7 +555,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0176e0459c2e4a1fe232f984bca6890e681076abb9934f6cea7c326f3fc47818" dependencies = [ "libc", - "windows-targets 0.48.1", + "windows-targets", ] [[package]] @@ -558,15 +575,6 @@ version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -dependencies = [ - "ahash", -] - [[package]] name = "hashbrown" version = "0.14.0" @@ -585,7 +593,7 @@ version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" dependencies = [ - "windows-sys 0.48.0", + "windows-sys", ] [[package]] @@ -633,7 +641,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" dependencies = [ "equivalent", - "hashbrown 0.14.0", + "hashbrown", "serde", ] @@ -651,7 +659,7 @@ checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi", "rustix", - "windows-sys 0.48.0", + "windows-sys", ] [[package]] @@ -708,9 +716,9 @@ checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" [[package]] name = "linux-raw-sys" -version = "0.4.3" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0" +checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" [[package]] name = "lock_api" @@ -730,11 +738,11 @@ checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" [[package]] name = "lscolors" -version = "0.14.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18a9df1d1fb6d9e92fa043e9eb9a3ecf6892c7b542bae5137cd1e419e40aa8bf" +checksum = "bf7015a04103ad78abb77e4b79ed151e767922d1cfde5f62640471c629a2320d" dependencies = [ - "nu-ansi-term 0.47.0", + "nu-ansi-term", ] [[package]] @@ -748,9 +756,9 @@ dependencies = [ [[package]] name = "luajit-src" -version = "210.4.6+resty2cf5186" +version = "210.4.7+resty107baaf" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c45ef28e0270605b160214758b57d97cb737b8c5f92885434b17b548fe50f117" +checksum = "ca76a3752fc130e5dabef71792f4f7095babb72f7c85860c7830eb746ad8bf31" dependencies = [ "cc", "which", @@ -811,7 +819,7 @@ dependencies = [ "libc", "log", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.48.0", + "windows-sys", ] [[package]] @@ -875,27 +883,18 @@ dependencies = [ [[package]] name = "nu-ansi-term" -version = "0.47.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1df031e117bca634c262e9bd3173776844b6c17a90b3741c9163663b4385af76" -dependencies = [ - "windows-sys 0.45.0", -] - -[[package]] -name = "nu-ansi-term" -version = "0.48.0" +version = "0.49.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db8e83967c32f9210ce85ac7e9c4b731048c1f51c4262e08bad01af30097a424" +checksum = "c073d3c1930d0751774acf49e66653acecb416c3a54c6ec095a9b11caddb5a68" dependencies = [ - "windows-sys 0.48.0", + "windows-sys", ] [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" dependencies = [ "autocfg", ] @@ -951,7 +950,7 @@ dependencies = [ "libc", "redox_syscall 0.3.5", "smallvec", - "windows-targets 0.48.1", + "windows-targets", ] [[package]] @@ -1057,9 +1056,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.31" +version = "1.0.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fe8a65d69dd0808184ebb5f836ab526bb259db23c657efa38711b1072ee47f0" +checksum = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965" dependencies = [ "proc-macro2", ] @@ -1072,7 +1071,7 @@ checksum = "8285baa38bdc9f879d92c0e37cb562ef38aa3aeefca22b3200186bc39242d3d5" dependencies = [ "bitflags 2.3.3", "cassowary", - "crossterm", + "crossterm 0.26.1", "indoc", "paste", "serde", @@ -1133,9 +1132,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.9.1" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2eae68fc220f7cf2532e4494aded17545fce192d59cd996e0fe7887f4ceb575" +checksum = "81bc1d4caf89fac26a70747fe603c130093b53c773888797a6329091246d651a" dependencies = [ "aho-corasick", "memchr", @@ -1145,9 +1144,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.3" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39354c10dd07468c2e73926b23bb9c2caca74c5501e38a35da70406f1d923310" +checksum = "fed1ceff11a1dddaee50c9dc8e4938bd106e9d89ae372f192311e7da498e3b69" dependencies = [ "aho-corasick", "memchr", @@ -1168,15 +1167,15 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustix" -version = "0.38.4" +version = "0.38.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a962918ea88d644592894bc6dc55acc6c0956488adcebbfb6e273506b7fd6e5" +checksum = "172891ebdceb05aa0005f533a6cbfca599ddd7d966f6f5d4d9b2e70478e70399" dependencies = [ "bitflags 2.3.3", "errno", "libc", "linux-raw-sys", - "windows-sys 0.48.0", + "windows-sys", ] [[package]] @@ -1208,29 +1207,29 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "serde" -version = "1.0.171" +version = "1.0.183" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30e27d1e4fd7659406c492fd6cfaf2066ba8773de45ca75e855590f856dc34a9" +checksum = "32ac8da02677876d532745a130fc9d8e6edfa81a269b107c5b00829b91d8eb3c" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.171" +version = "1.0.183" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "389894603bd18c46fa56231694f8d827779c0951a667087194cf9de94ed24682" +checksum = "aafe972d60b0b9bee71a91b92fee2d4fb3c9d7e8f6b179aa99f27203d99a4816" dependencies = [ "proc-macro2", "quote", - "syn 2.0.26", + "syn 2.0.28", ] [[package]] name = "serde_json" -version = "1.0.103" +version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d03b412469450d4404fe8499a268edd7f8b79fecb074b0d812ad64ca21f4031b" +checksum = "076066c5f1078eac5b722a31827a8832fe108bed65dfa75e233c89f8206e976c" dependencies = [ "itoa", "ryu", @@ -1239,9 +1238,9 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.9.24" +version = "0.9.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd5f51e3fdb5b9cdd1577e1cb7a733474191b1aca6a72c2e50913241632c1180" +checksum = "1a49e178e4452f45cb61d0cd8cebc1b0fafd3e41929e996cef79aa3aca91f574" dependencies = [ "indexmap", "itoa", @@ -1298,7 +1297,7 @@ dependencies = [ "nix 0.25.1", "rayon", "regex", - "time 0.3.23", + "time 0.3.25", "timer", "tuikit", "unicode-width", @@ -1346,9 +1345,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.26" +version = "2.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45c3457aacde3c65315de5031ec191ce46604304d2446e803d71ade03308d970" +checksum = "04361975b3f5e348b2189d8dc55bc942f278b2d482a6a0365de5bdd62d351567" dependencies = [ "proc-macro2", "quote", @@ -1385,22 +1384,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.43" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a35fc5b8971143ca348fa6df4f024d4d55264f3468c71ad1c2f365b0a4d58c42" +checksum = "611040a08a0439f8248d1990b111c95baa9c704c805fa1f62104b39655fd7f90" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.43" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "463fe12d7993d3b327787537ce8dd4dfa058de32fc2b195ef3cde03dc4771e8f" +checksum = "090198534930841fab3a5d1bb637cde49e339654e606195f8d9c76eeb081dc96" dependencies = [ "proc-macro2", "quote", - "syn 2.0.26", + "syn 2.0.28", ] [[package]] @@ -1426,10 +1425,11 @@ dependencies = [ [[package]] name = "time" -version = "0.3.23" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59e399c068f43a5d116fedaf73b203fa4f9c519f17e2b34f63221d3792f81446" +checksum = "b0fdd63d58b18d663fbdf70e049f00a22c8e42be082203be7f26589213cd75ea" dependencies = [ + "deranged", "itoa", "libc", "num_threads", @@ -1446,9 +1446,9 @@ checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" [[package]] name = "time-macros" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96ba15a897f3c86766b757e5ac7221554c6750054d74d5b28844fce5fb36a6c4" +checksum = "eb71511c991639bb078fd5bf97757e03914361c48100d52878b8e52b46fb92cd" dependencies = [ "time-core", ] @@ -1474,11 +1474,11 @@ dependencies = [ [[package]] name = "tui-input" -version = "0.7.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c0f17f46cee09b40dca10deac554e020fc2052c14f20192728cee884288227b" +checksum = "b3e785f863a3af4c800a2a669d0b64c879b538738e352607e2624d03f868dc01" dependencies = [ - "crossterm", + "crossterm 0.27.0", "serde", "unicode-width", ] @@ -1514,13 +1514,9 @@ checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" [[package]] name = "unicode-linebreak" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5faade31a542b8b35855fff6e8def199853b2da8da256da52f52f1316ee3137" -dependencies = [ - "hashbrown 0.12.3", - "regex", -] +checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" [[package]] name = "unicode-segmentation" @@ -1631,7 +1627,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.26", + "syn 2.0.28", "wasm-bindgen-shared", ] @@ -1653,7 +1649,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.26", + "syn 2.0.28", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -1722,16 +1718,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "windows-targets 0.48.1", -] - -[[package]] -name = "windows-sys" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" -dependencies = [ - "windows-targets 0.42.2", + "windows-targets", ] [[package]] @@ -1740,22 +1727,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.1", -] - -[[package]] -name = "windows-targets" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", + "windows-targets", ] [[package]] @@ -1764,93 +1736,51 @@ version = "0.48.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" dependencies = [ - "windows_aarch64_gnullvm 0.48.0", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", - "windows_x86_64_msvc 0.48.0", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" -[[package]] -name = "windows_aarch64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" - [[package]] name = "windows_aarch64_msvc" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" -[[package]] -name = "windows_i686_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" - [[package]] name = "windows_i686_gnu" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" -[[package]] -name = "windows_i686_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" - [[package]] name = "windows_i686_msvc" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" -[[package]] -name = "windows_x86_64_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" - [[package]] name = "windows_x86_64_gnu" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" - [[package]] name = "windows_x86_64_gnullvm" version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" -[[package]] -name = "windows_x86_64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" - [[package]] name = "windows_x86_64_msvc" version = "0.48.0" @@ -1859,12 +1789,9 @@ checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" [[package]] name = "xdg" -version = "2.5.0" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "688597db5a750e9cad4511cb94729a078e274308099a0382b5b8203bbc767fee" -dependencies = [ - "home", -] +checksum = "213b7324336b53d2414b2db8537e56544d981803139155afa84f76eeebb7a546" [[package]] name = "xplr" @@ -1874,7 +1801,7 @@ dependencies = [ "anyhow", "assert_cmd", "criterion", - "crossterm", + "crossterm 0.27.0", "gethostname", "home", "humansize", @@ -1886,7 +1813,7 @@ dependencies = [ "mime_guess", "mlua", "natord", - "nu-ansi-term 0.48.0", + "nu-ansi-term", "path-absolutize", "ratatui", "regex", @@ -1896,7 +1823,7 @@ dependencies = [ "skim", "snailquote", "textwrap", - "time 0.3.23", + "time 0.3.25", "tui-input", "which", "xdg", diff --git a/Cargo.toml b/Cargo.toml index cc99bbb..84db04b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,25 +26,25 @@ libc = "0.2.147" humansize = "2.1.3" natord = "1.0.9" anyhow = "1.0.72" -serde_yaml = "0.9.24" -crossterm = { version = "0.26.1", features = [], default-features = false } +serde_yaml = "0.9.25" +crossterm = { version = "0.27.0", features = [], default-features = false } ansi-to-tui = "3.1.0" -regex = "1.9.1" +regex = "1.9.3" gethostname = "0.4.3" -serde_json = "1.0.103" +serde_json = "1.0.104" path-absolutize = "3.1.0" which = "4.4.0" -nu-ansi-term = "0.48.0" +nu-ansi-term = "0.49.0" textwrap = "0.16" snailquote = "0.3.1" skim = { version = "0.10.4", default-features = false } -time = { version = "0.3.23", features = ["serde", "local-offset", "formatting", "macros"] } +time = { version = "0.3.25", features = ["serde", "local-offset", "formatting", "macros"] } jf = "0.6.2" -xdg = "2.5.0" +xdg = "2.5.2" home = "0.5.5" [dependencies.lscolors] -version = "0.14.0" +version = "0.15.0" default-features = false features = ["nu-ansi-term"] @@ -63,7 +63,7 @@ features = ['crossterm', 'serde'] package = 'ratatui' [dependencies.serde] -version = "1.0.171" +version = "1.0.183" features = [] default-features = false @@ -76,7 +76,7 @@ version = "0.8.9" features = ['luajit', 'vendored', 'serialize', 'send'] [dependencies.tui-input] -version = "0.7.1" +version = "0.8.0" features = ['serde'] [dev-dependencies] diff --git a/docs/landing/index.html b/docs/landing/index.html index d29ade9..1857081 100644 --- a/docs/landing/index.html +++ b/docs/landing/index.html @@ -151,7 +151,7 @@