diff --git a/.gitignore b/.gitignore index ea8c4bf..212de44 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /target +.DS_Store \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index be51667..f0c4531 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,16 +2,6 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "Inflector" -version = "0.11.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" -dependencies = [ - "lazy_static", - "regex", -] - [[package]] name = "adler" version = "1.0.2" @@ -35,7 +25,7 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "once_cell", "version_check", ] @@ -49,6 +39,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "allocator-api2" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" + [[package]] name = "alphanumeric-sort" version = "1.5.1" @@ -66,18 +62,9 @@ dependencies = [ [[package]] name = "ansi-str" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84252a7e1a0df81706ce70bbad85ed1e4916448a4093ccd52dd98c6a44a477cd" -dependencies = [ - "ansitok", -] - -[[package]] -name = "ansi-str" -version = "0.7.2" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b1ed1c166829a0ccb5d79caa0f75cb4abd4adb2ce2c096755b7ad5ffdb0990" +checksum = "1cf4578926a981ab0ca955dc023541d19de37112bc24c1a197bd806d3d86ad1d" dependencies = [ "ansitok", ] @@ -89,7 +76,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "220044e6a1bb31ddee4e3db724d29767f352de47445a6cd75e1a173142136c83" dependencies = [ "nom", - "vte", + "vte 0.10.1", ] [[package]] @@ -144,29 +131,12 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" -[[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 0.3.9", -] - [[package]] name = "autocfg" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" -[[package]] -name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - [[package]] name = "base64" version = "0.21.0" @@ -175,11 +145,11 @@ checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" [[package]] name = "bindgen" -version = "0.59.2" +version = "0.66.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bd2a9a458e8f4304c52c43ebb0cfbd520289f8379a52e329a38afda99bf8eb8" +checksum = "f2b84e06fc203107bfbad243f4aba2af864eb7db3b1cf46ea0a023b0b433d2a7" dependencies = [ - "bitflags", + "bitflags 2.4.0", "cexpr", "clang-sys", "lazy_static", @@ -190,6 +160,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", + "syn 2.0.31", ] [[package]] @@ -213,6 +184,12 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" + [[package]] name = "block-buffer" version = "0.10.4" @@ -222,6 +199,12 @@ dependencies = [ "generic-array", ] +[[package]] +name = "bracoxide" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8654ced31d3071e01cee9112fb25f241798b17b08d083512f8da2afa3da076b" + [[package]] name = "brownstone" version = "3.0.0" @@ -278,25 +261,19 @@ checksum = "38fcc2979eff34a4b84e1cf9a1e3da42a7d44b3b690a40cdcb23e3d556cfb2e5" [[package]] name = "calamine" -version = "0.19.1" +version = "0.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6381d1037ee9b8a6c8eb97936add0331a1aabd148d5b6f35f1cda6e5dec44f40" +checksum = "95f023f9ae2c2f017564b7eca85660c3c09477bb037f2fbfbaaba732b5642a32" dependencies = [ "byteorder", "codepage", "encoding_rs", "log", - "quick-xml 0.25.0", + "quick-xml 0.28.2", "serde", "zip", ] -[[package]] -name = "cassowary" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df8670b8c7b9dae1793364eafadf7239c40d669904660c5960d74cfd80b46a53" - [[package]] name = "cc" version = "1.0.79" @@ -312,12 +289,6 @@ dependencies = [ "nom", ] -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -338,7 +309,7 @@ dependencies = [ "serde", "time 0.1.45", "wasm-bindgen", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -402,7 +373,7 @@ checksum = "223163f58c9a40c3b0a43e1c4b50a9ce09f007ea2cb1ec258a687945b4b7929f" dependencies = [ "anstream", "anstyle", - "bitflags", + "bitflags 1.3.2", "clap_lex", "strsim", ] @@ -416,7 +387,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.14", + "syn 2.0.31", ] [[package]] @@ -523,7 +494,7 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -532,7 +503,7 @@ version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crossbeam-utils", ] @@ -542,7 +513,7 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crossbeam-epoch", "crossbeam-utils", ] @@ -554,7 +525,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695" dependencies = [ "autocfg", - "cfg-if 1.0.0", + "cfg-if", "crossbeam-utils", "memoffset", "scopeguard", @@ -566,40 +537,24 @@ version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] name = "crossterm" -version = "0.24.0" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab9f7409c70a38a56216480fba371ee460207dd8926ccf5b4160591759559170" +checksum = "a84cda67535339806297f1b331d6dd6320470d2a0fe65381e79ee9e156dd3d13" dependencies = [ - "bitflags", + "bitflags 1.3.2", "crossterm_winapi", "libc", - "mio 0.8.6", + "mio", "parking_lot", "serde", "signal-hook", "signal-hook-mio", - "winapi 0.3.9", -] - -[[package]] -name = "crossterm" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e64e6c0fbe2c17357405f7c758c1ef960fce08bdfb2c03d88d2a18d7e09c4b67" -dependencies = [ - "bitflags", - "crossterm_winapi", - "libc", - "mio 0.8.6", - "parking_lot", - "signal-hook", - "signal-hook-mio", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -608,7 +563,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2ae1b35a484aa10e07fe0638d02301c5ad24de82d310ccbd2f3693da5f09bf1c" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] @@ -649,7 +604,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd4056f63fce3b82d852c3da92b08ea59959890813a7f4ce9c0ff85b10cf301b" dependencies = [ "quote", - "syn 2.0.14", + "syn 2.0.31", ] [[package]] @@ -676,7 +631,7 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.14", + "syn 2.0.31", ] [[package]] @@ -693,9 +648,15 @@ checksum = "2345488264226bf682893e25de0769f3360aac9957980ec49361b083ddaa5bc5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.14", + "syn 2.0.31", ] +[[package]] +name = "deranged" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" + [[package]] name = "dialoguer" version = "0.10.4" @@ -703,6 +664,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "59c6f2989294b9a498d3ad5491a79c6deb604617378e1cdc4bfc1c1361fe2f87" dependencies = [ "console", + "fuzzy-matcher", "shell-words", ] @@ -728,7 +690,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "dirs-sys-next", ] @@ -740,14 +702,14 @@ checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" dependencies = [ "libc", "redox_users", - "winapi 0.3.9", + "winapi", ] [[package]] name = "dtparse" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbd3b6a23c50eb90a80bdb748042620328617e76276b99dc5c97906e47f807c3" +checksum = "68235de3c014ade82e550337b2c88a2a884361793ed3be2d74ee703bd810e401" dependencies = [ "chrono", "lazy_static", @@ -773,7 +735,7 @@ version = "0.8.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -789,6 +751,12 @@ dependencies = [ "termcolor", ] +[[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" @@ -798,17 +766,6 @@ dependencies = [ "serde", ] -[[package]] -name = "errno" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" -dependencies = [ - "errno-dragonfly", - "libc", - "winapi 0.3.9", -] - [[package]] name = "errno" version = "0.3.1" @@ -867,29 +824,38 @@ version = "3.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39ae6b3d9530211fb3b12a95374b8b0823be812f53d09e18c5675c0146b09642" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "rustix 0.37.11", "windows-sys 0.48.0", ] +[[package]] +name = "file-id" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13be71e6ca82e91bc0cb862bebaac0b2d1924a5a1d970c822b2f98b63fda8c3" +dependencies = [ + "winapi-util", +] + [[package]] name = "filesize" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12d741e2415d4e2e5bd1c1d00409d1a8865a57892c2d689b504365655d237d43" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] name = "filetime" -version = "0.2.21" +version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cbc844cecaee9d4443931972e1289c8ff485cb4cc2767cb03ca139ed6885153" +checksum = "d4029edd3e734da6fe05b6cd7bd2960760a616bd2ddd0d59a0124746d6272af0" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", - "redox_syscall 0.2.16", + "redox_syscall 0.3.5", "windows-sys 0.48.0", ] @@ -939,41 +905,15 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" -[[package]] -name = "fsevent" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ab7d1bd1bd33cc98b0889831b72da23c0aa4df9cec7e0702f46ecea04b35db6" -dependencies = [ - "bitflags", - "fsevent-sys", -] - [[package]] name = "fsevent-sys" -version = "2.0.1" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f41b048a94555da0f42f1d632e2e19510084fb8e303b0daa2816e733fb3644a0" +checksum = "76ee7a02da4d231650c7cea31349b889be2f45ddb3ef3032d2ec8185f6313fd2" dependencies = [ "libc", ] -[[package]] -name = "fuchsia-zircon" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" -dependencies = [ - "bitflags", - "fuchsia-zircon-sys", -] - -[[package]] -name = "fuchsia-zircon-sys" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" - [[package]] name = "futures" version = "0.3.28" @@ -1030,7 +970,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.14", + "syn 2.0.31", ] [[package]] @@ -1094,7 +1034,7 @@ version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "wasi 0.11.0+wasi-snapshot-preview1", ] @@ -1107,7 +1047,7 @@ checksum = "e77ac7b51b8e6313251737fcef4b1c01a2ea102bde68415b62c0ee9268fec357" dependencies = [ "proc-macro2", "quote", - "syn 2.0.14", + "syn 2.0.31", ] [[package]] @@ -1127,11 +1067,12 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.13.2" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" dependencies = [ "ahash 0.8.3", + "allocator-api2", ] [[package]] @@ -1149,15 +1090,6 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - [[package]] name = "hermit-abi" version = "0.2.6" @@ -1202,7 +1134,7 @@ dependencies = [ "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows 0.48.0", + "windows", ] [[package]] @@ -1239,7 +1171,16 @@ checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", "hashbrown 0.12.3", - "serde", +] + +[[package]] +name = "indexmap" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +dependencies = [ + "equivalent", + "hashbrown 0.14.0", ] [[package]] @@ -1256,11 +1197,11 @@ dependencies = [ [[package]] name = "inotify" -version = "0.7.1" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4816c66d2c8ae673df83366c18341538f234a26d65a9ecea5c348b453ac1d02f" +checksum = "f8069d3ec154eb856955c1c0fbffefbf5f3c40a104ec912d4797314c1801abff" dependencies = [ - "bitflags", + "bitflags 1.3.2", "inotify-sys", "libc", ] @@ -1280,7 +1221,7 @@ version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -1305,34 +1246,33 @@ dependencies = [ ] [[package]] -name = "iovec" -version = "0.1.4" +name = "is-docker" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" +checksum = "928bae27f42bc99b60d9ac7334e3a21d10ad8f1835a4e12ec3ec0464765ed1b3" dependencies = [ - "libc", + "once_cell", ] [[package]] -name = "is-root" -version = "0.1.2" +name = "is-terminal" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04a4202a60e86f1c9702706bb42270dadd333f2db7810157563c86f17af3c873" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ - "users 0.10.0", - "winapi 0.3.9", + "hermit-abi 0.3.1", + "rustix 0.38.11", + "windows-sys 0.48.0", ] [[package]] -name = "is-terminal" -version = "0.4.7" +name = "is-wsl" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" +checksum = "173609498df190136aa7dea1a91db051746d339e18476eed5ca40521f02d7aa5" dependencies = [ - "hermit-abi 0.3.1", - "io-lifetimes", - "rustix 0.37.11", - "windows-sys 0.48.0", + "is-docker", + "once_cell", ] [[package]] @@ -1353,7 +1293,7 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa9acdc6d67b75e626ad644734e8bc6df893d9cd2a834129065d3dd6158ea9c8" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1387,23 +1327,23 @@ dependencies = [ ] [[package]] -name = "json_to_table" -version = "0.3.1" +name = "kqueue" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0be33515faeb3773f550c80fd7a889148164e58f7e3cf36467718c8ce71ee55" +checksum = "7447f1ca1b7b563588a205fe93dea8df60fd981423a768bc1c0ded35ed147d0c" dependencies = [ - "serde_json", - "tabled", + "kqueue-sys", + "libc", ] [[package]] -name = "kernel32-sys" -version = "0.2.2" +name = "kqueue-sys" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" +checksum = "ed9625ffda8729b85e45cf04090035ac368927b8cebc34898e7c120f52e4838b" dependencies = [ - "winapi 0.2.8", - "winapi-build", + "bitflags 1.3.2", + "libc", ] [[package]] @@ -1420,9 +1360,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.141" +version = "0.2.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5" +checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" [[package]] name = "libloading" @@ -1430,26 +1370,26 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" dependencies = [ - "cfg-if 1.0.0", - "winapi 0.3.9", + "cfg-if", + "winapi", ] [[package]] name = "libproc" -version = "0.12.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b799ad155d75ce914c467ee5627b62247c20d4aedbd446f821484cebf3cded7" +checksum = "0fba61dbe003b79fe1af52ff15a489e50b9e66b36c79f945fbcbcf02e895f26d" dependencies = [ "bindgen", - "errno 0.2.8", + "errno", "libc", ] [[package]] name = "libsqlite3-sys" -version = "0.25.2" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29f835d03d717946d28b1d1ed632eb6f0e24a299388ee623d0c23118d3e8a7fa" +checksum = "afc22eff61b133b115c6e8c74e818c628d6d5e7a502afea6f64dee076dd94326" dependencies = [ "cc", "pkg-config", @@ -1486,6 +1426,12 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d59d8c75012853d2e872fb56bc8a2e53718e2cafe1a4c823143141c6d90c322f" +[[package]] +name = "linux-raw-sys" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" + [[package]] name = "lock_api" version = "0.4.9" @@ -1502,25 +1448,25 @@ version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] name = "lru" -version = "0.9.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71e7d46de488603ffdd5f30afbc64fbba2378214a2c3a2fb83abf3d33126df17" +checksum = "eedb2bdbad7e0634f83989bf596f497b070130daaa398ab22d84c39e266deec5" dependencies = [ - "hashbrown 0.13.2", + "hashbrown 0.14.0", ] [[package]] name = "lscolors" -version = "0.12.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "074bff749d092e2e818fe954952102f88e21f67fc69f4d350621aab15a1810f1" +checksum = "bf7015a04103ad78abb77e4b79ed151e767922d1cfde5f62640471c629a2320d" dependencies = [ - "crossterm 0.24.0", + "nu-ansi-term", ] [[package]] @@ -1558,9 +1504,9 @@ dependencies = [ [[package]] name = "miette" -version = "5.7.0" +version = "5.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7abdc09c381c9336b9f2e9bd6067a9a5290d20e2d2e2296f275456121c33ae89" +checksum = "59bb584eaeeab6bd0226ccf3509a69d7936d148cf3d036ad350abe35e8c6856e" dependencies = [ "is-terminal", "miette-derive", @@ -1577,13 +1523,13 @@ dependencies = [ [[package]] name = "miette-derive" -version = "5.7.0" +version = "5.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8842972f23939443013dfd3720f46772b743e86f1a81d120d4b6fb090f87de1c" +checksum = "49e7bc1560b95a3c4a25d03de42fe76ca718ab92d1a22a55b9b4cf67b3ae635c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.14", + "syn 2.0.31", ] [[package]] @@ -1617,25 +1563,6 @@ dependencies = [ "adler", ] -[[package]] -name = "mio" -version = "0.6.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4afd66f5b91bf2a3bc13fad0e21caedac168ca4c707504e75585648ae80e4cc4" -dependencies = [ - "cfg-if 0.1.10", - "fuchsia-zircon", - "fuchsia-zircon-sys", - "iovec", - "kernel32-sys", - "libc", - "log", - "miow", - "net2", - "slab", - "winapi 0.2.8", -] - [[package]] name = "mio" version = "0.8.6" @@ -1648,30 +1575,6 @@ dependencies = [ "windows-sys 0.45.0", ] -[[package]] -name = "mio-extras" -version = "2.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19" -dependencies = [ - "lazycell", - "log", - "mio 0.6.23", - "slab", -] - -[[package]] -name = "miow" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebd808424166322d4a38da87083bfddd3ac4c131334ed55856112eb06d46944d" -dependencies = [ - "kernel32-sys", - "net2", - "winapi 0.2.8", - "ws2_32-sys", -] - [[package]] name = "native-tls" version = "0.2.11" @@ -1690,25 +1593,14 @@ dependencies = [ "tempfile", ] -[[package]] -name = "net2" -version = "0.2.38" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d0df99cfcd2530b2e694f6e17e7f37b8e26bb23983ac530c0c97408837c631" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "winapi 0.3.9", -] - [[package]] name = "nix" version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" dependencies = [ - "bitflags", - "cfg-if 1.0.0", + "bitflags 1.3.2", + "cfg-if", "libc", "static_assertions", ] @@ -1738,20 +1630,33 @@ dependencies = [ [[package]] name = "notify" -version = "4.0.17" +version = "6.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae03c8c853dba7bfd23e571ff0cff7bc9dceb40a4cd684cd1681824183f45257" +checksum = "6205bd8bb1e454ad2e27422015fb5e4f2bcc7e08fa8f27058670d208324a4d2d" dependencies = [ - "bitflags", + "bitflags 2.4.0", + "crossbeam-channel", "filetime", - "fsevent", "fsevent-sys", "inotify", + "kqueue", "libc", - "mio 0.6.23", - "mio-extras", + "log", + "mio", + "walkdir", + "windows-sys 0.48.0", +] + +[[package]] +name = "notify-debouncer-full" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "416969970ec751a5d702a88c6cd19ac1332abe997fce43f96db0418550426241" +dependencies = [ + "file-id", + "notify", + "parking_lot", "walkdir", - "winapi 0.3.9", ] [[package]] @@ -1760,34 +1665,36 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc51db7b362b205941f71232e56c625156eb9a929f8cf74a428fd5bc094a4afc" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] name = "nu-ansi-term" -version = "0.47.0" +version = "0.49.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1df031e117bca634c262e9bd3173776844b6c17a90b3741c9163663b4385af76" +checksum = "c073d3c1930d0751774acf49e66653acecb416c3a54c6ec095a9b11caddb5a68" dependencies = [ - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] name = "nu-cli" -version = "0.77.1" +version = "0.84.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9500ce249de515436f73fba612011f870bf407ef970bacfc713f647468c20e92" +checksum = "e609ca775a0d4b24ef4f98da52a1b69d1364a5db36a63c44c863bbd16a5e8d0b" dependencies = [ - "atty", "chrono", - "crossterm 0.24.0", + "crossterm", "fancy-regex", "fuzzy-matcher", + "is-terminal", "is_executable", "log", "miette", "nu-ansi-term", + "nu-cmd-base", "nu-color-config", + "nu-command", "nu-engine", "nu-parser", "nu-path", @@ -1797,20 +1704,30 @@ dependencies = [ "percent-encoding", "reedline", "sysinfo", - "thiserror", + "unicode-segmentation", +] + +[[package]] +name = "nu-cmd-base" +version = "0.84.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "279c2881b2b5168c5d9d854e7b5b13ac49ab2487c3b10af163e0986f78dd69d9" +dependencies = [ + "indexmap 2.0.0", + "nu-engine", + "nu-path", + "nu-protocol", ] [[package]] name = "nu-cmd-lang" -version = "0.77.1" +version = "0.84.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2824f4c362823b1b51c97b17b814041d7d0704aae0cf9cc4e217607e6379e772" +checksum = "68db9e3c32c648f16b2eee1b10cd60b53a9503969bc26ad6dc7eddc0b97cca7b" dependencies = [ "fancy-regex", "itertools", - "log", "nu-ansi-term", - "nu-color-config", "nu-engine", "nu-parser", "nu-protocol", @@ -1820,9 +1737,9 @@ dependencies = [ [[package]] name = "nu-color-config" -version = "0.77.1" +version = "0.84.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec7d6e6f94090922e915a411ccb2ca3da477aa5bc4ce09703509aa6873bfdef7" +checksum = "f6e6bbaa8ddd18937fa1e14afb80827fa17b6525c907bdd44280d18f78601ef5" dependencies = [ "nu-ansi-term", "nu-engine", @@ -1830,26 +1747,24 @@ dependencies = [ "nu-protocol", "nu-utils", "serde", - "tabled", ] [[package]] name = "nu-command" -version = "0.77.1" +version = "0.84.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5213499d95fe7e73d6ddad618975ebb8cfa76c352afe30e998b64a724db7ae4" +checksum = "052bb6a763695fb615fe1bc0e7eafb5d783f8f37df3bd58d1c3daa27b3d254d8" dependencies = [ - "Inflector", "alphanumeric-sort", - "atty", - "base64 0.21.0", + "base64", + "bracoxide", "byteorder", "bytesize", "calamine", "chrono", "chrono-humanize", "chrono-tz", - "crossterm 0.24.0", + "crossterm", "csv", "dialoguer", "digest", @@ -1860,23 +1775,24 @@ dependencies = [ "filetime", "fs_extra", "htmlescape", - "indexmap", + "indexmap 2.0.0", "indicatif", - "is-root", + "is-terminal", "itertools", "libc", "log", "lscolors", "md-5", + "miette", "mime", "mime_guess", "native-tls", - "notify", + "nix", + "notify-debouncer-full", "nu-ansi-term", - "nu-cmd-lang", + "nu-cmd-base", "nu-color-config", "nu-engine", - "nu-explore", "nu-glob", "nu-json", "nu-parser", @@ -1891,88 +1807,61 @@ dependencies = [ "num-traits", "once_cell", "open", + "os_pipe", "pathdiff", "percent-encoding", "powierza-coefficient", "print-positions", - "quick-xml 0.27.1", + "quick-xml 0.30.0", "rand", "rayon", - "reedline", "regex", "roxmltree", - "rust-embed", "same-file", "serde", + "serde_json", "serde_urlencoded", "serde_yaml", "sha2", "sysinfo", "tabled", "terminal_size 0.2.6", - "thiserror", "titlecase", "toml", "umask", "unicode-segmentation", - "unicode-width", "ureq", "url", - "users 0.11.0", "uuid", "wax", - "windows 0.44.0", + "windows", "winreg", ] [[package]] name = "nu-engine" -version = "0.77.1" +version = "0.84.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "156d78ac9ec155d763297e4e8a1e218ecba3f02a87079618de16997aa4161257" +checksum = "88fbd754026a4d75fc8e7fe2237a69d49d3c861cf895fe7ae85dabdcb7800ab3" dependencies = [ - "chrono", "nu-glob", "nu-path", "nu-protocol", "nu-utils", - "serde", "sysinfo", ] -[[package]] -name = "nu-explore" -version = "0.77.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66a2589cd81223947753b419115f5743bc9756679d9ecde6b6bbac2193f091c7" -dependencies = [ - "ansi-str 0.7.2", - "crossterm 0.24.0", - "lscolors", - "nu-ansi-term", - "nu-color-config", - "nu-engine", - "nu-json", - "nu-parser", - "nu-protocol", - "nu-table", - "nu-utils", - "strip-ansi-escapes", - "terminal_size 0.2.6", - "tui", -] - [[package]] name = "nu-glob" -version = "0.77.1" +version = "0.84.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6f1c8542b1b558b84043c8baf457468bdb0395283ae6da3e84c4aec9b94a33" +checksum = "ac3d79473e0ae8a6ead8b6e432763f693921d0b2f61ff47740f28e36757e69a1" [[package]] name = "nu-json" -version = "0.77.1" +version = "0.84.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3369b20d2ac5aa3269ffbb7183b94e64c21ec145a011ad0ddcac2e3562140f8b" +checksum = "1115d5b4890947fbc83e9712c961c4266535a9532a2b246f076201e38a2a64a3" dependencies = [ "linked-hash-map", "num-traits", @@ -1981,27 +1870,25 @@ dependencies = [ [[package]] name = "nu-parser" -version = "0.77.1" +version = "0.84.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a216a0d043a298a035b1f97c9eeb00a3378fdfc397f324b3006c1c34c0016281" +checksum = "6460e8517a558a9e5523edd21712487e6cbd16c8266b5452c8f80be4b0b31aab" dependencies = [ "bytesize", "chrono", "itertools", "log", - "miette", "nu-engine", "nu-path", "nu-protocol", "serde_json", - "thiserror", ] [[package]] name = "nu-path" -version = "0.77.1" +version = "0.84.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b924633f57afa426b4e0db4eeabf99d969a6773c028c9f76fd9258359b5fa85c" +checksum = "837d73d1a752ceca884f1bc2b619a271b967ff24fc456d30462816d378518cfb" dependencies = [ "dirs-next", "omnipath", @@ -2010,46 +1897,42 @@ dependencies = [ [[package]] name = "nu-pretty-hex" -version = "0.77.1" +version = "0.84.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cbfb29bbbab4f3b14e3c5bf586943161462c859aa0168a52e2dbc1bbc085348" +checksum = "5b7713523ea9bc5b7be1a0a588a934b2bf9a863ef1b870cca8e542606b0ef37f" dependencies = [ "nu-ansi-term", ] [[package]] name = "nu-protocol" -version = "0.77.1" +version = "0.84.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccd4d31c1dc86e44b1a41bb5edcd9b1d247d7df545ee43d739360bb00cb5ca2b" +checksum = "e5e27eb9f6e2fa414b5f8667d07c990bf071106786043d2c19d0ec870db2ad5f" dependencies = [ "byte-unit", "chrono", "chrono-humanize", "fancy-regex", - "indexmap", + "indexmap 2.0.0", "lru", "miette", "nu-utils", "num-format", "serde", "serde_json", - "strum", - "strum_macros", - "sys-locale", "thiserror", "typetag", ] [[package]] name = "nu-system" -version = "0.77.1" +version = "0.84.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09846ef8a8da6b74d172bcf57f3e7d6b47d01be82c1a7bf9f8e9d34fa86a083b" +checksum = "b548b53df2c70ea2018b003b120528a1f17cf29c9bfec193fb7b443446650f2f" dependencies = [ - "atty", "chrono", - "errno 0.3.1", + "is-terminal", "libc", "libproc", "log", @@ -2058,31 +1941,28 @@ dependencies = [ "ntapi", "once_cell", "procfs", - "winapi 0.3.9", + "winapi", ] [[package]] name = "nu-table" -version = "0.77.1" +version = "0.84.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d37895015edc5e6dd1c7bfedef95b0e67141952b9a458fe874dc9c5009f61728" +checksum = "a0343fae642ae6beb8178489233bd8e5d1e7813d3b3a97fc6b5676117db200bf" dependencies = [ - "atty", - "json_to_table", "nu-ansi-term", "nu-color-config", "nu-engine", "nu-protocol", "nu-utils", - "serde_json", "tabled", ] [[package]] name = "nu-term-grid" -version = "0.77.1" +version = "0.84.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0881daeed34049e5ea8552e696cbfd99e8a215bc280c71d093b5f85b699f0858" +checksum = "b08bf4a8c528b4f73b82beb0b709e3e10e6e5a63dce50a89eb8e6b7647573e39" dependencies = [ "nu-utils", "unicode-width", @@ -2090,9 +1970,9 @@ dependencies = [ [[package]] name = "nu-utils" -version = "0.77.1" +version = "0.84.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04f4e2b747a7dd41c053e937ebd2fed6a33739788e4ebeb214e556e80dd34993" +checksum = "e7c991c9145490d260c3c05f10faf8d808cd4382ef3b1b2c6fef8fcc5cbe3b1b" dependencies = [ "crossterm_winapi", "log", @@ -2221,18 +2101,19 @@ checksum = "68432e1692e9b974a51efd452485db50f92827fe0931d16721ad867633a571b6" [[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 = "open" -version = "3.2.0" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2078c0039e6a54a0c42c28faa984e115fb4c2d5bf2208f77d1961002df8576f8" +checksum = "cfabf1927dce4d6fdf563d63328a0a506101ced3ec780ca2135747336c98cef8" dependencies = [ + "is-wsl", + "libc", "pathdiff", - "windows-sys 0.42.0", ] [[package]] @@ -2241,8 +2122,8 @@ version = "0.10.50" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7e30d8bc91859781f0a943411186324d580f2bbeb71b452fe91ae344806af3f1" dependencies = [ - "bitflags", - "cfg-if 1.0.0", + "bitflags 1.3.2", + "cfg-if", "foreign-types", "libc", "once_cell", @@ -2258,7 +2139,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.14", + "syn 2.0.31", ] [[package]] @@ -2279,6 +2160,16 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "os_pipe" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ae859aa07428ca9a929b936690f8b12dc5f11dd8c6992a18ca93919f28bc177" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + [[package]] name = "owo-colors" version = "3.5.0" @@ -2287,11 +2178,11 @@ checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" [[package]] name = "papergrid" -version = "0.7.1" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1526bb6aa9f10ec339fb10360f22c57edf81d5678d0278e93bc12a47ffbe4b01" +checksum = "a2ccbe15f2b6db62f9a9871642746427e297b0ceb85f9a7f1ee5ff47d184d0c8" dependencies = [ - "ansi-str 0.5.0", + "ansi-str", "ansitok", "bytecount", "fnv", @@ -2314,7 +2205,7 @@ version = "0.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "redox_syscall 0.2.16", "smallvec", @@ -2344,9 +2235,9 @@ checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" [[package]] name = "percent-encoding" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "phf" @@ -2430,6 +2321,7 @@ dependencies = [ "itertools", "log", "nu-cli", + "nu-cmd-lang", "nu-command", "nu-engine", "nu-parser", @@ -2463,35 +2355,11 @@ dependencies = [ "unicode-segmentation", ] -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn 1.0.109", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", -] - [[package]] name = "proc-macro2" -version = "1.0.56" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] @@ -2502,7 +2370,7 @@ version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "943ca7f9f29bab5844ecd8fdb3992c5969b6622bb9609b9502fef9b4310e3f1f" dependencies = [ - "bitflags", + "bitflags 1.3.2", "byteorder", "chrono", "flate2", @@ -2529,9 +2397,9 @@ dependencies = [ [[package]] name = "quick-xml" -version = "0.25.0" +version = "0.28.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58e21a144a0ffb5fad7b464babcdab934a325ad69b7c0373bcfef5cbd9799ca9" +checksum = "0ce5e73202a820a31f8a0ee32ada5e21029c81fd9e3ebf668a40832e4219d9d1" dependencies = [ "encoding_rs", "memchr", @@ -2539,18 +2407,18 @@ dependencies = [ [[package]] name = "quick-xml" -version = "0.27.1" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc053f057dd768a56f62cd7e434c42c831d296968997e9ac1f76ea7c2d14c41" +checksum = "eff6510e86862b57b210fd8cbe8ed3f0d7d600b9c2863cd4549a2e033c66e956" dependencies = [ "memchr", ] [[package]] name = "quote" -version = "1.0.26" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -2613,7 +2481,7 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -2622,7 +2490,7 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -2638,12 +2506,12 @@ dependencies = [ [[package]] name = "reedline" -version = "0.17.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3afcd7fc553d129e9a03d17f15c4b4748baa589570f01a372caae2de81989b8" +checksum = "3defc4467a8909614bcb02cb304a3e8472c31f7a44e6c6c287eb9575b212bc4d" dependencies = [ "chrono", - "crossterm 0.24.0", + "crossterm", "fd-lock", "itertools", "nu-ansi-term", @@ -2708,7 +2576,7 @@ version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290ca1a1c8ca7edb7c3283bd44dc35dd54fdec6253a3912e201ba1072018fca8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "proc-macro2", "quote", "rustc_version", @@ -2730,11 +2598,11 @@ dependencies = [ [[package]] name = "rusqlite" -version = "0.28.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01e213bc3ecb39ac32e81e51ebe31fd888a940515173e3a18a35f8c6e896422a" +checksum = "549b9d036d571d42e6e85d1c1425e2ac83491075078ca9a15be021c56b1641f2" dependencies = [ - "bitflags", + "bitflags 2.4.0", "fallible-iterator", "fallible-streaming-iterator", "hashlink", @@ -2742,40 +2610,6 @@ dependencies = [ "smallvec", ] -[[package]] -name = "rust-embed" -version = "6.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b68543d5527e158213414a92832d2aab11a84d2571a5eb021ebe22c43aab066" -dependencies = [ - "rust-embed-impl", - "rust-embed-utils", - "walkdir", -] - -[[package]] -name = "rust-embed-impl" -version = "6.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4e0f0ced47ded9a68374ac145edd65a6c1fa13a96447b873660b2a568a0fd7" -dependencies = [ - "proc-macro2", - "quote", - "rust-embed-utils", - "syn 1.0.109", - "walkdir", -] - -[[package]] -name = "rust-embed-utils" -version = "7.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512b0ab6853f7e14e3c8754acb43d6f748bb9ced66aa5915a6553ac8213f7731" -dependencies = [ - "sha2", - "walkdir", -] - [[package]] name = "rust_decimal" version = "1.29.1" @@ -2807,8 +2641,8 @@ version = "0.36.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0af200a3324fa5bcd922e84e9b55a298ea9f431a489f01961acdebc6e908f25" dependencies = [ - "bitflags", - "errno 0.3.1", + "bitflags 1.3.2", + "errno", "io-lifetimes", "libc", "linux-raw-sys 0.1.4", @@ -2821,14 +2655,27 @@ version = "0.37.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85597d61f83914ddeba6a47b3b8ffe7365107221c2e557ed94426489fefb5f77" dependencies = [ - "bitflags", - "errno 0.3.1", + "bitflags 1.3.2", + "errno", "io-lifetimes", "libc", "linux-raw-sys 0.3.1", "windows-sys 0.48.0", ] +[[package]] +name = "rustix" +version = "0.38.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0c3dde1fc030af041adc40e79c0e7fbcf431dd24870053d187d7c66e4b87453" +dependencies = [ + "bitflags 2.4.0", + "errno", + "libc", + "linux-raw-sys 0.4.5", + "windows-sys 0.48.0", +] + [[package]] name = "rustversion" version = "1.0.12" @@ -2877,7 +2724,7 @@ version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a332be01508d814fed64bf28f798a146d73792121129962fdf335bb3c49a4254" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "core-foundation-sys", "libc", @@ -2902,29 +2749,29 @@ checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" [[package]] name = "serde" -version = "1.0.160" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2f3770c8bce3bcda7e149193a069a0f4365bda1fa5cd88e03bca26afc1216c" +checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.160" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291a097c63d8497e00160b166a967a4a79c64f3facdd01cbd7502231688d77df" +checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.14", + "syn 2.0.31", ] [[package]] name = "serde_json" -version = "1.0.95" +version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d721eca97ac802aa7777b701877c8004d950fc142651367300d21c1cc0194744" +checksum = "693151e1ac27563d6dbcec9dee9fbd5da8539b20fa14ad3752b2e6d363ace360" dependencies = [ "itoa", "ryu", @@ -2958,7 +2805,7 @@ version = "0.9.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9d684e3ec7de3bf5466b32bd75303ac16f0736426e5a4e0d6e489559ce1249c" dependencies = [ - "indexmap", + "indexmap 1.9.3", "itoa", "ryu", "serde", @@ -2971,20 +2818,20 @@ version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest", ] [[package]] name = "shadow-rs" -version = "0.21.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "427f07ab5f873000cf55324882e12a88c0a7ea7025df4fc1e7e35e688877a583" +checksum = "970538704756fd0bb4ec8cb89f80674afb661e7c0fe716f9ba5be57717742300" dependencies = [ "const_format", "is_debug", - "time 0.3.20", + "time 0.3.28", ] [[package]] @@ -3016,7 +2863,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "29ad2e15f37ec9a6cc544097b78a1ec90001e9f71b81338ca39f430adaca99af" dependencies = [ "libc", - "mio 0.8.6", + "mio", "signal-hook", ] @@ -3073,11 +2920,11 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "strip-ansi-escapes" -version = "0.1.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "011cbb39cf7c1f62871aea3cc46e5817b0937b49e9447370c93cacbe93a766d8" +checksum = "55ff8ef943b384c414f54aefa961dd2bd853add74ec75e7ac74cf91dba62bcfa" dependencies = [ - "vte", + "vte 0.11.1", ] [[package]] @@ -3088,21 +2935,21 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "strum" -version = "0.24.1" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" +checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" [[package]] name = "strum_macros" -version = "0.24.3" +version = "0.25.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" +checksum = "ad8d03b598d3d0fff69bf533ee3ef19b8eeb342729596df84bcc7e1f96ec4059" dependencies = [ "heck", "proc-macro2", "quote", "rustversion", - "syn 1.0.109", + "syn 2.0.31", ] [[package]] @@ -3146,9 +2993,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.14" +version = "2.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcf316d5356ed6847742d036f8a39c3b8435cac10bd528a4bd461928a6ab34d5" +checksum = "718fa2415bcb8d8bd775917a1bf12a7931b6dfa890753378538118181e0cb398" dependencies = [ "proc-macro2", "quote", @@ -3157,64 +3004,47 @@ dependencies = [ [[package]] name = "sys-locale" -version = "0.2.4" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8a11bd9c338fdba09f7881ab41551932ad42e405f61d01e8406baea71c07aee" +checksum = "e801cf239ecd6ccd71f03d270d67dd53d13e90aab208bf4b8fe4ad957ea949b0" dependencies = [ - "js-sys", "libc", - "wasm-bindgen", - "web-sys", - "windows-sys 0.45.0", ] [[package]] name = "sysinfo" -version = "0.28.4" +version = "0.29.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4c2f3ca6693feb29a89724516f016488e9aafc7f37264f898593ee4b942f31b" +checksum = "a8d0e9cc2273cc8d31377bdd638d72e3ac3e5607b18621062b169d02787f1bab" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "core-foundation-sys", "libc", "ntapi", "once_cell", "rayon", - "winapi 0.3.9", + "winapi", ] [[package]] name = "tabled" -version = "0.10.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c3ee73732ffceaea7b8f6b719ce3bb17f253fa27461ffeaf568ebd0cdb4b85" +checksum = "dfe9c3632da101aba5131ed63f9eed38665f8b3c68703a6bb18124835c1a5d22" dependencies = [ - "ansi-str 0.5.0", + "ansi-str", + "ansitok", "papergrid", - "tabled_derive", "unicode-width", ] -[[package]] -name = "tabled_derive" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "beca1b4eaceb4f2755df858b88d9b9315b7ccfd1ffd0d7a48a52602301f01a57" -dependencies = [ - "heck", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "tempfile" version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9fbec84f381d5795b08656e4912bec604d162bff9291d6189a78f4c8ab87998" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "fastrand", "redox_syscall 0.3.5", "rustix 0.37.11", @@ -3237,7 +3067,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "633c1a546cee861a1a6d0dc69ebeca693bf4296661ba7852b9d21d159e0506df" dependencies = [ "libc", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -3278,7 +3108,7 @@ checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.14", + "syn 2.0.31", ] [[package]] @@ -3287,7 +3117,7 @@ version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "once_cell", ] @@ -3299,15 +3129,16 @@ checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" dependencies = [ "libc", "wasi 0.10.0+wasi-snapshot-preview1", - "winapi 0.3.9", + "winapi", ] [[package]] name = "time" -version = "0.3.20" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd0cbfecb4d19b5ea75bb31ad904eb5b9fa13f21079c3b92017ebdf4999a5890" +checksum = "17f6bb557fd245c28e6411aa56b6403c689ad95061f50e4be16c274e70a17e48" dependencies = [ + "deranged", "itoa", "libc", "num_threads", @@ -3318,15 +3149,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" +checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" [[package]] name = "time-macros" -version = "0.2.8" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd80a657e71da814b8e5d60d3374fc6d35045062245d80224748ae522dd76f36" +checksum = "1a942f44339478ef67935ab2bbaec2fb0322496cf3cbe84b261e06ac3814c572" dependencies = [ "time-core", ] @@ -3384,26 +3215,13 @@ version = "0.19.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "239410c8609e8125456927e6707163a3b1fdb40561e4b803bc041f466ccfdc13" dependencies = [ - "indexmap", + "indexmap 1.9.3", "serde", "serde_spanned", "toml_datetime", "winnow", ] -[[package]] -name = "tui" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccdd26cbd674007e649a272da4475fb666d3aa0ad0531da7136db6fab0e5bad1" -dependencies = [ - "bitflags", - "cassowary", - "crossterm 0.25.0", - "unicode-segmentation", - "unicode-width", -] - [[package]] name = "typenum" version = "1.16.0" @@ -3431,7 +3249,7 @@ checksum = "bb01b60fcc3f5e17babb1a9956263f3ccd2cadc3e52908400231441683283c1d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.14", + "syn 2.0.31", ] [[package]] @@ -3509,11 +3327,11 @@ checksum = "1865806a559042e51ab5414598446a5871b561d21b6764f2eabb0dd481d880a6" [[package]] name = "ureq" -version = "2.6.2" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "338b31dd1314f68f3aabf3ed57ab922df95ffcd902476ca7ba3c4ce7b908c46d" +checksum = "0b11c96ac7ee530603dcdf68ed1557050f374ce55a5a07193ebf8cbc9f8927e9" dependencies = [ - "base64 0.13.1", + "base64", "encoding_rs", "flate2", "log", @@ -3535,26 +3353,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "users" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa4227e95324a443c9fcb06e03d4d85e91aabe9a5a02aa818688b6918b6af486" -dependencies = [ - "libc", - "log", -] - -[[package]] -name = "users" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24cc0f6d6f267b73e5a2cadf007ba8f9bc39c6a6f9666f8cf25ea809a153b032" -dependencies = [ - "libc", - "log", -] - [[package]] name = "utf8-width" version = "0.1.6" @@ -3599,6 +3397,16 @@ dependencies = [ "vte_generate_state_changes", ] +[[package]] +name = "vte" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5022b5fbf9407086c180e9557be968742d839e68346af7792b8592489732197" +dependencies = [ + "utf8parse", + "vte_generate_state_changes", +] + [[package]] name = "vte_generate_state_changes" version = "0.1.1" @@ -3637,7 +3445,7 @@ version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "wasm-bindgen-macro", ] @@ -3703,22 +3511,6 @@ dependencies = [ "walkdir", ] -[[package]] -name = "web-sys" -version = "0.3.61" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "winapi" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" - [[package]] name = "winapi" version = "0.3.9" @@ -3729,12 +3521,6 @@ dependencies = [ "winapi-x86_64-pc-windows-gnu", ] -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" - [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" @@ -3747,7 +3533,7 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] @@ -3756,15 +3542,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "windows" -version = "0.44.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e745dab35a0c4c77aa3ce42d595e13d2003d6902d6b08c9ef5fc326d08da12b" -dependencies = [ - "windows-targets 0.42.2", -] - [[package]] name = "windows" version = "0.48.0" @@ -3932,22 +3709,12 @@ dependencies = [ [[package]] name = "winreg" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76a1a57ff50e9b408431e8f97d5456f2807f8eb2a2cd79b06068fc87f8ecf189" -dependencies = [ - "cfg-if 1.0.0", - "winapi 0.3.9", -] - -[[package]] -name = "ws2_32-sys" -version = "0.2.1" +version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ - "winapi 0.2.8", - "winapi-build", + "cfg-if", + "windows-sys 0.48.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 3abc145..096a481 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,12 +11,13 @@ readme = "README.md" clap = { version = "4.1.8", features = ["derive"] } itertools = "0.10.5" log = "0.4.17" -nu-cli = "0.77.1" -nu-command = "0.77.1" -nu-parser = "0.77.1" -nu-protocol = "0.77.1" -reedline = "0.17.0" -nu-engine = "0.77.1" +nu-cli = "0.84.0" +nu-command = "0.84.0" +nu-cmd-lang = "0.84.0" +nu-parser = "0.84.0" +nu-protocol = "0.84.0" +reedline = "0.23.0" +nu-engine = "0.84.0" regex = "1.7.1" env_logger = "0.10.0" diff --git a/README.md b/README.md index 8d47e54..a3a742b 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,12 @@ Blazing fast tab completion for powershell and pwsh. ![demo](media/demo.gif) +This video is using the `MenuComplete` binding in `code $PROFILE`: + +```powershell +Set-PSReadLineKeyHandler -Key Tab MenuComplete +``` + Features: * Fast startup and execution using [nushell/nu-engine](https://crates.io/crates/nu-engine) * Extendable using `.nu` files, with built in support for commmon tasks like `git` and `npm run` @@ -17,11 +23,11 @@ By default, [completions.nu](./resource/completions.nu) is used. An alternative ### Step 1. Install binary -There are binaries available in [releases](https://github.com/domsleee/posh-tabcomplete/releases) or with one of these commands: +There are binaries available in [releases](https://github.com/domsleee/posh-tabcomplete/releases), or with one of these commands: -| Repository | Instructions | -| --------------- | --------------------------------------- | -| **[crates.io]** | `cargo install posh-tabcomplete --locked`| +| Repository | Instructions | +| --------------- | ----------------------------------------- | +| **[crates.io]** | `cargo install posh-tabcomplete --locked` | ### Step 2. Setup powershell @@ -31,7 +37,7 @@ Add this line to your profile, you can edit this by typing `code $PROFILE` in po Invoke-Expression (&posh-tabcomplete init | Out-String) ``` -[crates.io]: https://crates.io/crates/starship +[crates.io]: https://crates.io/crates/posh-tabcomplete ## Built in completions The completions packaged with the binary in [completions.nu](./resource/completions.nu) are: @@ -42,10 +48,10 @@ The completions packaged with the binary in [completions.nu](./resource/completi ## Benchmarks To run these, run `./benchmark/benchmark_all.ps1` -Benchmark | Results -----------|----------- -`benchmark/init` - startup time | posh-tabcomplete: 102ms, posh-git: 432ms (4.24x faster) -`benchmark/complete` - tab completion (100 branches) | posh-tabcomplete: 71ms, posh-git: 172ms (2.42x faster) +| Benchmark | Results | +| ---------------------------------------------------- | ------------------------------------------------------- | +| `benchmark/init` - startup time | posh-tabcomplete: 102ms, posh-git: 432ms (4.24x faster) | +| `benchmark/complete` - tab completion (100 branches) | posh-tabcomplete: 71ms, posh-git: 172ms (2.42x faster) | ## Aliases / Function support Functions are supported. For example, the completion of `gco` in the demo is: @@ -53,4 +59,20 @@ Functions are supported. For example, the completion of `gco` in the demo is: function gco() { git checkout $args } ``` -There is no support for alias completions at this time. \ No newline at end of file +There is no support for alias completions at this time. + +## Full list of completions + +See [completions.nu](./resource/completions.nu): + +* `git` + * `branch` + * `checkout` + * `cherry-pick` + * `fetch` + * `merge` + * `push` + * `rebase` + * `switch` +* `npm` + * `run` \ No newline at end of file diff --git a/resource/completions.nu b/resource/completions.nu index 3694d61..48a4ed4 100644 --- a/resource/completions.nu +++ b/resource/completions.nu @@ -16,6 +16,10 @@ def "nu-complete git remotes" [] { ^git remote | lines | each { |line| $line | str trim } } +def "nu-complete git remote or branch" [] { + (nu-complete git remotes) ++ (nu-complete git branches) +} + def "nu-complete git log" [] { ^git log --pretty=%h | lines | each { |line| $line | str trim } } @@ -202,6 +206,81 @@ extern "git branch" [ --default(-d) # Use default branch of the submodule ] +# Join two or more development histories together +extern "git merge" [ + ...refs: string@"nu-complete git switchable branches" # branch to merge with + --commit # Autocommit the merge + --no-commit # Don't autocommit the merge + --edit(-e) # Edit auto-generated merge message + --no-edit # Don't edit auto-generated merge message + --ff # Don't generate a merge commit if merge is fast-forward + --no-ff # Generate a merge commit even if merge is fast-forward + --ff-only # Refuse to merge unless fast-forward possible + --gpg-sign(-S) # GPG-sign the merge commit + --log # Populate the log message with one-line descriptions + --no-log # Don't populate the log message with one-line descriptions + --signoff # Add Signed-off-by line at the end of the merge commit message + --no-signoff # Do not add a Signed-off-by line at the end of the merge commit message + --stat # Show diffstat of the merge + --no-stat(-n) # Don't show diffstat of the merge + --squash # Squash changes from other branch as a single commit + --no-squash # Don't squash changes + --verify-signatures # Abort merge if other branch tip commit is not signed with a valid key + --no-verify-signatures # Do not abort merge if other branch tip commit is not signed with a valid key + --quiet(-q) # Be quiet + --verbose(-v) # Be verbose + --progress # Force progress status + --no-progress # Force no progress status + --allow-unrelated-histories # Allow merging even when branches do not share a common history + --rerere-autoupdate # If possible, use previous conflict resolutions + --no-rerere-autoupdate # Do not use previous conflict resolutions + --abort # Abort the current conflict resolution process + --continue # Conclude current conflict resolution process + --all(-a) # Output all merge bases for the commits, instead of just one + --octopus # Compute the best common ancestors of all supplied commits + --independent # Print a minimal subset of the supplied commits with the same ancestors + --is-ancestor # Check if the first commit is an ancestor of the second commit + --fork-point # Find the point at which a branch forked from another branch ref + --tool-help # Print a list of merge tools that may be used with `--tool` + --no-prompt(-y) # Do not prompt before launching a diff tool + --prompt # Prompt before each invocation of the merge resolution program + --verbose(-v) # Be more verbose + --quiet(-q) # Operate quietly + --commit # Finalize git notes merge + --abort # Abort git notes merge +] + + +# Forward-port local commits to the updated upstream head +extern "git rebase" [ + remoteOrBranch?: string@"nu-complete git remote or branch", # the name of the remote / branch + ...refs: string@"nu-complete git branches" # the branch / refspec + --continue # Restart the rebasing process + --abort # Abort the rebase operation + --edit-todo # Edit the todo list + --keep-empty # Keep the commits that don't change anything + --skip # Restart the rebasing process by skipping the current patch + --merge(-m) # Use merging strategies to rebase + --quiet(-q) # Be quiet + --verbose(-v) # Be verbose + --stat # Show diffstat of the rebase + --no-stat(-n) # Don't show diffstat of the rebase + --verify # Allow the pre-rebase hook to run + --no-verify # Don't allow the pre-rebase hook to run + --force-rebase(-f) # Force the rebase + --committer-date-is-author-date # Use the author date as the committer date + --ignore-date # Use the committer date as the author date + --interactive(-i) # Interactive mode + --preserve-merges(-p) # Try to recreate merges + --rebase-merges(-r) # Preserve branch structure + --root # Rebase all reachable commits + --autosquash # Automatic squashing + --no-autosquash # No automatic squashing + --autostash # Before starting rebase, stash local changes, and apply stash when done + --no-autostash # Do not stash local changes before starting rebase + --no-ff # No fast-forward +] + ### FROM AUTOCOMPLETIONS https://github.com/nushell/nu_scripts/tree/main/custom-completions/auto-generate ### Please fix these if they are wrong @@ -217,11 +296,11 @@ extern "git filter-branch" [ --parent-filter # This is the filter for rewriting the commit --msg-filter # This is the filter for rewriting the commit messages --commit-filter # This is the filter for performing the commit - --tag-name-filter # This is the filter for rewriting tag names - --subdirectory-filter # Only look at the history which touches the given subdirectory + --tag-name-filter # This is the filter for rewriting tag names + --subdirectory-filter # Only look at the history which touches the given subdirectory --prune-empty # Ignore empty commits generated by filters - --original # Use this option to set the namespace where the original commits will be stored - --force(-f) # Filter even with refs in refs/original or existing temp directory + --original # Use this option to set the namespace where the original commits will be stored + --force(-f) # Filter even with refs in refs/original or existing temp directory ...args ] # Manage set of tracked repositories @@ -987,49 +1066,6 @@ extern "git unregister" [ ...args ] -# Join two or more development histories together -extern "git merge" [ - --commit # Autocommit the merge - --no-commit # Don't autocommit the merge - --edit(-e) # Edit auto-generated merge message - --no-edit # Don't edit auto-generated merge message - --ff # Don't generate a merge commit if merge is fast-forward - --no-ff # Generate a merge commit even if merge is fast-forward - --ff-only # Refuse to merge unless fast-forward possible - --gpg-sign(-S) # GPG-sign the merge commit - --log # Populate the log message with one-line descriptions - --no-log # Don't populate the log message with one-line descriptions - --signoff # Add Signed-off-by line at the end of the merge commit message - --no-signoff # Do not add a Signed-off-by line at the end of the merge commit message - --stat # Show diffstat of the merge - --no-stat(-n) # Don't show diffstat of the merge - --squash # Squash changes from other branch as a single commit - --no-squash # Don't squash changes - --verify-signatures # Abort merge if other branch tip commit is not signed with a valid key - --no-verify-signatures # Do not abort merge if other branch tip commit is not signed with a valid key - --quiet(-q) # Be quiet - --verbose(-v) # Be verbose - --progress # Force progress status - --no-progress # Force no progress status - --allow-unrelated-histories # Allow merging even when branches do not share a common history - --rerere-autoupdate # If possible, use previous conflict resolutions - --no-rerere-autoupdate # Do not use previous conflict resolutions - --abort # Abort the current conflict resolution process - --continue # Conclude current conflict resolution process - --all(-a) # Output all merge bases for the commits, instead of just one - --octopus # Compute the best common ancestors of all supplied commits - --independent # Print a minimal subset of the supplied commits with the same ancestors - --is-ancestor # Check if the first commit is an ancestor of the second commit - --fork-point # Find the point at which a branch forked from another branch ref - --tool-help # Print a list of merge tools that may be used with `--tool` - --no-prompt(-y) # Do not prompt before launching a diff tool - --prompt # Prompt before each invocation of the merge resolution program - --verbose(-v) # Be more verbose - --quiet(-q) # Operate quietly - --commit # Finalize git notes merge - --abort # Abort git notes merge - ...args -] # Find as good common ancestors as possible for a merge extern "git merge-base" [ --all(-a) # Output all merge bases for the commits, instead of just one @@ -1188,34 +1224,6 @@ extern "git range-diff" [ --no-dual-color # Use simple diff colors ...args ] -# Forward-port local commits to the updated upstream head -extern "git rebase" [ - --continue # Restart the rebasing process - --abort # Abort the rebase operation - --edit-todo # Edit the todo list - --keep-empty # Keep the commits that don't change anything - --skip # Restart the rebasing process by skipping the current patch - --merge(-m) # Use merging strategies to rebase - --quiet(-q) # Be quiet - --verbose(-v) # Be verbose - --stat # Show diffstat of the rebase - --no-stat(-n) # Don't show diffstat of the rebase - --verify # Allow the pre-rebase hook to run - --no-verify # Don't allow the pre-rebase hook to run - --force-rebase(-f) # Force the rebase - --committer-date-is-author-date # Use the author date as the committer date - --ignore-date # Use the committer date as the author date - --interactive(-i) # Interactive mode - --preserve-merges(-p) # Try to recreate merges - --rebase-merges(-r) # Preserve branch structure - --root # Rebase all reachable commits - --autosquash # Automatic squashing - --no-autosquash # No automatic squashing - --autostash # Before starting rebase, stash local changes, and apply stash when done - --no-autostash # Do not stash local changes before starting rebase - --no-ff # No fast-forward - ...args -] # Preserve branch structure extern "git rebase-cousins no-rebase-cousins" [ @@ -1503,9 +1511,6 @@ extern "git help" [ ] # https://github.com/nushell/nu_scripts/blob/main/custom-completions/npm/npm-completions.nu -export extern "npm" [ - command?: string@"nu-complete npm" -] def "nu-complete npm" [] { ^npm -l |lines @@ -1515,6 +1520,9 @@ def "nu-complete npm" [] { |get column4 |str replace '"' '' } +export extern "npm" [ + command?: string@"nu-complete npm" +] def "nu-complete npm run" [] { open ./package.json @@ -1563,7 +1571,7 @@ def "nu-complete cargo features" [] { # `cargo --list` is slow, `open` is faster. # TODO: Add caching. def "nu-complete cargo subcommands" [] { - ^cargo --list | lines | skip 1 | str collect "\n" | from ssv --noheaders | get column1 + ^cargo --list | lines | skip 1 | str join "\n" | from ssv --noheaders | get column1 } def "nu-complete cargo vcs" [] { [ diff --git a/src/nu_util.rs b/src/nu_util.rs index ea4f9d7..7c400f9 100644 --- a/src/nu_util.rs +++ b/src/nu_util.rs @@ -3,6 +3,7 @@ use std::path::{Path, PathBuf}; use nu_cli::NuCompleter; use nu_engine::eval_block; use nu_parser::parse; +use nu_protocol::report_error; use nu_protocol::{ engine::{EngineState, Stack, StateWorkingSet}, PipelineData, ShellError, Span, Value, @@ -26,8 +27,11 @@ fn merge_input( ) -> Result<(), ShellError> { let (block, delta) = { let mut working_set = StateWorkingSet::new(engine_state); - let (block, err) = parse(&mut working_set, None, input, false, &[]); - assert!(err.is_none(), "unexpected error: {err:?}"); + let block = parse(&mut working_set, None, input, false); + if let Some(err) = working_set.parse_errors.first() { + report_error(&working_set, err); + std::process::exit(1); + } (block, working_set.render()) }; @@ -53,8 +57,8 @@ fn merge_input( fn new_engine(pwd: &Path) -> (PathBuf, String, EngineState, Stack) { let dir_str: String = pwd.display().to_string(); - let mut engine_state = nu_command::create_default_context(); - + let mut engine_state = + nu_command::add_shell_command_context(nu_cmd_lang::create_default_context()); let mut stack = Stack::new(); stack.add_env_var( "PWD".to_string(), diff --git a/tests/test_command_names.rs b/tests/test_command_names.rs index 994065d..16836f5 100644 --- a/tests/test_command_names.rs +++ b/tests/test_command_names.rs @@ -12,11 +12,7 @@ use speculoos::prelude::ContainingIntoIterAssertions; #[apply(shell_to_use)] fn test_command_names(shell: &str) { - let testenv = TestEnv::new(shell); - let res = testenv - .run_with_profile("Get-CommandNamesUsingRegex") - .unwrap(); - let lines = res.stdout.lines().map(|x| x.unwrap()).collect_vec(); + let lines = util::run_command(shell, "Get-CommandNamesUsingRegex"); println!("{lines:?}"); assert_that!(lines).contains("git".to_string()); } diff --git a/tests/test_complete.rs b/tests/test_complete.rs deleted file mode 100644 index aabe0b2..0000000 --- a/tests/test_complete.rs +++ /dev/null @@ -1,68 +0,0 @@ -use std::io::BufRead; - -use itertools::Itertools; -use rstest::rstest; -use rstest_reuse::{self, *}; -use speculoos::assert_that; - -extern crate speculoos; -use crate::speculoos::prelude::ContainingIntoIterAssertions; - -mod testenv; -pub use testenv::*; - -#[apply(shell_to_use)] -fn test_checkout_branches(shell: &str) { - let testenv = TestEnv::new(shell); - let res = testenv - .run_with_profile("Invoke-TabComplete 'git checkout '") - .unwrap(); - let lines = res.stdout.lines().map(|x| x.unwrap()).collect_vec(); - - assert_that!(lines).contains("testbranch".to_string()); - assert_that!(lines).contains("testbranch23".to_string()); -} - -#[apply(shell_to_use)] -fn test_checkout_branches2(shell: &str) { - let testenv = TestEnv::new(shell); - let res = testenv - .run_with_profile("Invoke-TabComplete 'git checkout testbranch2'") - .unwrap(); - let lines = res.stdout.lines().map(|x| x.unwrap()).collect_vec(); - assert_that!(lines).contains("testbranch23".to_string()); -} - -#[apply(shell_to_use)] -fn test_checkout_branches_alias(shell: &str) { - let testenv = TestEnv::new(shell); - let res = testenv - .run_with_profile("Invoke-TabComplete 'myLongGitCheckoutAlias '") - .unwrap(); - let lines = res.stdout.lines().map(|x| x.unwrap()).collect_vec(); - assert_that!(lines).contains("testbranch".to_string()); - assert_that!(lines).contains("testbranch23".to_string()); -} - -#[apply(shell_to_use)] -fn test_checkout_completions_registered(shell: &str) { - let testenv = TestEnv::new(shell); - let res = testenv - .run_with_profile( - "Get-ArgumentCompleter -Native | ForEach-Object { \"$($_.CommandName)\" }", - ) - .unwrap(); - let lines = res.stdout.lines().map(|x| x.unwrap()).collect_vec(); - assert_that!(lines).contains("myLongGitCheckoutAlias".to_string()); - assert_that!(lines).contains("git".to_string()); -} - -#[apply(shell_to_use)] -fn test_complete_nongit_command(shell: &str) { - let testenv = TestEnv::new_with_other_nu(shell); - let res = testenv - .run_with_profile("Invoke-TabComplete 'burrito -'") - .unwrap(); - let lines = res.stdout.lines().map(|x| x.unwrap()).collect_vec(); - assert_that!(lines).contains("--hello-there".to_string()); -} diff --git a/tests/test_complete_aliases.rs b/tests/test_complete_aliases.rs new file mode 100644 index 0000000..1b616eb --- /dev/null +++ b/tests/test_complete_aliases.rs @@ -0,0 +1,26 @@ +use rstest::rstest; +use rstest_reuse::{self, *}; +use speculoos::assert_that; + +extern crate speculoos; +use crate::speculoos::prelude::ContainingIntoIterAssertions; + +mod testenv; +pub use testenv::*; + +#[apply(shell_to_use)] +fn test_checkout_branches_alias(shell: &str) { + let lines = util::run_command(shell, "Invoke-TabComplete 'myLongGitCheckoutAlias '"); + assert_that!(lines).contains("testbranch".to_string()); + assert_that!(lines).contains("testbranch23".to_string()); +} + +#[apply(shell_to_use)] +fn test_checkout_completions_registered(shell: &str) { + let lines = util::run_command( + shell, + "Get-ArgumentCompleter -Native | ForEach-Object { \"$($_.CommandName)\" }", + ); + assert_that!(lines).contains("myLongGitCheckoutAlias".to_string()); + assert_that!(lines).contains("git".to_string()); +} diff --git a/tests/test_complete_git.rs b/tests/test_complete_git.rs new file mode 100644 index 0000000..958305c --- /dev/null +++ b/tests/test_complete_git.rs @@ -0,0 +1,70 @@ +use std::io::BufRead; + +use itertools::Itertools; +use rstest::rstest; +use rstest_reuse::{self, *}; +use speculoos::assert_that; + +extern crate speculoos; +use crate::speculoos::prelude::ContainingIntoIterAssertions; + +mod testenv; +pub use testenv::*; + +#[apply(shell_to_use)] +fn test_checkout_branches(shell: &str) { + let lines = util::run_command(shell, "Invoke-TabComplete 'git checkout '"); + assert_that!(lines).contains("testbranch".to_string()); + assert_that!(lines).contains("testbranch23".to_string()); +} + +#[apply(shell_to_use)] +fn test_checkout_branches2(shell: &str) { + let lines = util::run_command(shell, "Invoke-TabComplete 'git checkout testbranch2'"); + assert_that!(lines).contains("testbranch23".to_string()); +} + +#[apply(shell_to_use)] +fn test_merge(shell: &str) { + let lines = util::run_command(shell, "Invoke-TabComplete 'git merge '"); + assert_that!(lines).contains("testbranch".to_string()); + assert_that!(lines).contains("testbranch23".to_string()); +} + +#[apply(shell_to_use)] +fn test_fetch_first_arg(shell: &str) { + let lines = util::run_command(shell, "Invoke-TabComplete 'git fetch '"); + assert_that!(lines).contains("origin".to_string()); +} + +#[apply(shell_to_use)] +fn test_fetch_second_arg(shell: &str) { + let lines = util::run_command(shell, "Invoke-TabComplete 'git fetch origin '"); + assert_that!(lines).contains("testbranch".to_string()); + assert_that!(lines).contains("testbranch23".to_string()); +} + +#[apply(shell_to_use)] +fn test_rebase_first_arg(shell: &str) { + let lines = util::run_command(shell, "Invoke-TabComplete 'git rebase '"); + assert_that!(lines).contains("testbranch".to_string()); + assert_that!(lines).contains("testbranch23".to_string()); + assert_that!(lines).contains("origin".to_string()); +} + +#[apply(shell_to_use)] +fn test_rebase_second_arg(shell: &str) { + let lines = util::run_command(shell, "Invoke-TabComplete 'git rebase origin '"); + assert_that!(lines).contains("testbranch".to_string()); + assert_that!(lines).contains("testbranch23".to_string()); +} + +#[apply(shell_to_use)] +fn test_complete_nongit_command(shell: &str) { + let testenv = TestEnv::new_with_other_nu(shell); + let res = testenv + .run_with_profile("Invoke-TabComplete 'burrito -'") + .unwrap(); + let lines = res.stdout.lines().map(|x| x.unwrap()).collect_vec(); + assert_that!(lines).contains("--hello-there".to_string()); +} diff --git a/tests/testenv/mod.rs b/tests/testenv/mod.rs index 17ff07b..ee14612 100644 --- a/tests/testenv/mod.rs +++ b/tests/testenv/mod.rs @@ -10,6 +10,7 @@ use std::{ process::{Command, Output}, }; use tempfile::TempDir; +pub mod util; const PATH: &str = "PATH"; @@ -142,6 +143,7 @@ fn create_working_dir(profile_prefix_data: Vec<&str>) -> Result<(TempDir, PathBu run_git(&["config", "user.name", "yourname"]); run_git(&["commit", "-m", "test"]); run_git(&["checkout", "-b", "testbranch23"]); + run_git(&["remote", "add", "origin", "test@test.test"]); profile_path }; diff --git a/tests/testenv/util.rs b/tests/testenv/util.rs index e69de29..34551a1 100644 --- a/tests/testenv/util.rs +++ b/tests/testenv/util.rs @@ -0,0 +1,9 @@ +use std::io::BufRead; + +use crate::TestEnv; + +pub fn run_command(shell: &str, command: &str) -> Vec { + let testenv = TestEnv::new(shell); + let res = testenv.run_with_profile(command).unwrap(); + res.stdout.lines().map(|x| x.unwrap()).collect() +}