mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 22:50:14 +02:00
Compare commits
22 Commits
0.105.0
...
revert-159
Author | SHA1 | Date | |
---|---|---|---|
4f67310681 | |||
fb691c0da5 | |||
7972aea530 | |||
aa710eeb9a | |||
91e843a6d4 | |||
ebcb26f9d5 | |||
f8b0af70ff | |||
12465193a4 | |||
bd3930d00d | |||
81e86c40e1 | |||
2fe25d6299 | |||
4aeede2dd5 | |||
0e46ef9769 | |||
962467fdfd | |||
d27232df6e | |||
d7cec2088a | |||
22d1fdcdf6 | |||
ba59f71f20 | |||
2352548467 | |||
3efbda63b8 | |||
1fe62ee613 | |||
126d11fcb7 |
@ -30,10 +30,4 @@ rustflags = ["-C", "link-args=-stack:10000000", "-C", "target-feature=+crt-stati
|
||||
[target.aarch64-apple-darwin]
|
||||
# We can guarantee that this target will always run on a CPU with _at least_
|
||||
# these capabilities, so let's optimize for them
|
||||
rustflags = ["-Ctarget-cpu=apple-m1"]
|
||||
|
||||
# This is required for uutils/coreutils version 0.1.0 and later
|
||||
# It looks like this is what they use to name their executable
|
||||
# https://github.com/uutils/coreutils/blob/61bd11a55118458704c4cbbf4e628cd657238d3e/src/uucore/src/lib/lib.rs#L201-L218
|
||||
[env]
|
||||
PROJECT_NAME_FOR_VERSION_STRING = "nushell"
|
||||
rustflags = ["-Ctarget-cpu=apple-m1"]
|
7
.github/workflows/winget-submission.yml
vendored
7
.github/workflows/winget-submission.yml
vendored
@ -10,6 +10,11 @@ on:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
packages: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
|
||||
winget:
|
||||
@ -25,5 +30,5 @@ jobs:
|
||||
installers-regex: 'msvc\.msi$'
|
||||
version: ${{ inputs.tag_name || github.event.release.tag_name }}
|
||||
release-tag: ${{ inputs.tag_name || github.event.release.tag_name }}
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
token: ${{ secrets.NUSHELL_PAT }}
|
||||
fork-user: nushell
|
||||
|
386
Cargo.lock
generated
386
Cargo.lock
generated
@ -96,32 +96,13 @@ dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ansi-str"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1cf4578926a981ab0ca955dc023541d19de37112bc24c1a197bd806d3d86ad1d"
|
||||
dependencies = [
|
||||
"ansitok 0.2.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ansi-str"
|
||||
version = "0.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "060de1453b69f46304b28274f382132f4e72c55637cf362920926a70d090890d"
|
||||
dependencies = [
|
||||
"ansitok 0.3.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ansitok"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "220044e6a1bb31ddee4e3db724d29767f352de47445a6cd75e1a173142136c83"
|
||||
dependencies = [
|
||||
"nom 7.1.3",
|
||||
"vte 0.10.1",
|
||||
"ansitok",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -235,12 +216,6 @@ version = "0.3.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb"
|
||||
|
||||
[[package]]
|
||||
name = "arrayvec"
|
||||
version = "0.5.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b"
|
||||
|
||||
[[package]]
|
||||
name = "arrayvec"
|
||||
version = "0.7.6"
|
||||
@ -702,19 +677,6 @@ dependencies = [
|
||||
"vsimd",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bigdecimal"
|
||||
version = "0.4.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1a22f228ab7a1b23027ccc6c350b72868017af7ea8356fbdf19f8d991c690013"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"libm",
|
||||
"num-bigint",
|
||||
"num-integer",
|
||||
"num-traits",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bincode"
|
||||
version = "1.3.3"
|
||||
@ -779,7 +741,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3888aaa89e4b2a40fca9848e400f6a658a5a3978de7be858e209cafa8be9a4a0"
|
||||
dependencies = [
|
||||
"arrayref",
|
||||
"arrayvec 0.7.6",
|
||||
"arrayvec",
|
||||
"cc",
|
||||
"cfg-if",
|
||||
"constant_time_eq",
|
||||
@ -996,9 +958,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "chrono"
|
||||
version = "0.4.41"
|
||||
version = "0.4.39"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d"
|
||||
checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825"
|
||||
dependencies = [
|
||||
"android-tzdata",
|
||||
"iana-time-zone",
|
||||
@ -1007,7 +969,7 @@ dependencies = [
|
||||
"pure-rust-locales",
|
||||
"serde",
|
||||
"wasm-bindgen",
|
||||
"windows-link",
|
||||
"windows-targets 0.52.6",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -1754,6 +1716,12 @@ dependencies = [
|
||||
"regex",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "env_home"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c7f84e12ccf0a7ddc17a6c41c93326024c42920d7ee630d04950e6926645c0fe"
|
||||
|
||||
[[package]]
|
||||
name = "env_logger"
|
||||
version = "0.8.4"
|
||||
@ -1949,51 +1917,6 @@ dependencies = [
|
||||
"num-traits",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fluent"
|
||||
version = "0.17.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8137a6d5a2c50d6b0ebfcb9aaa91a28154e0a70605f112d30cb0cd4a78670477"
|
||||
dependencies = [
|
||||
"fluent-bundle",
|
||||
"unic-langid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fluent-bundle"
|
||||
version = "0.16.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "01203cb8918f5711e73891b347816d932046f95f54207710bda99beaeb423bf4"
|
||||
dependencies = [
|
||||
"fluent-langneg",
|
||||
"fluent-syntax",
|
||||
"intl-memoizer",
|
||||
"intl_pluralrules",
|
||||
"rustc-hash 2.1.0",
|
||||
"self_cell",
|
||||
"smallvec",
|
||||
"unic-langid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fluent-langneg"
|
||||
version = "0.13.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2c4ad0989667548f06ccd0e306ed56b61bd4d35458d54df5ec7587c0e8ed5e94"
|
||||
dependencies = [
|
||||
"unic-langid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fluent-syntax"
|
||||
version = "0.12.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "54f0d287c53ffd184d04d8677f590f4ac5379785529e5e08b1c8083acdd5c198"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
"thiserror 2.0.12",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fluent-uri"
|
||||
version = "0.1.4"
|
||||
@ -2678,7 +2601,7 @@ dependencies = [
|
||||
"displaydoc",
|
||||
"yoke",
|
||||
"zerofrom",
|
||||
"zerovec 0.10.4",
|
||||
"zerovec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -2689,9 +2612,9 @@ checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637"
|
||||
dependencies = [
|
||||
"displaydoc",
|
||||
"litemap",
|
||||
"tinystr 0.7.6",
|
||||
"tinystr",
|
||||
"writeable",
|
||||
"zerovec 0.10.4",
|
||||
"zerovec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -2704,8 +2627,8 @@ dependencies = [
|
||||
"icu_locid",
|
||||
"icu_locid_transform_data",
|
||||
"icu_provider",
|
||||
"tinystr 0.7.6",
|
||||
"zerovec 0.10.4",
|
||||
"tinystr",
|
||||
"zerovec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -2729,7 +2652,7 @@ dependencies = [
|
||||
"utf16_iter",
|
||||
"utf8_iter",
|
||||
"write16",
|
||||
"zerovec 0.10.4",
|
||||
"zerovec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -2749,8 +2672,8 @@ dependencies = [
|
||||
"icu_locid_transform",
|
||||
"icu_properties_data",
|
||||
"icu_provider",
|
||||
"tinystr 0.7.6",
|
||||
"zerovec 0.10.4",
|
||||
"tinystr",
|
||||
"zerovec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -2769,11 +2692,11 @@ dependencies = [
|
||||
"icu_locid",
|
||||
"icu_provider_macros",
|
||||
"stable_deref_trait",
|
||||
"tinystr 0.7.6",
|
||||
"tinystr",
|
||||
"writeable",
|
||||
"yoke",
|
||||
"zerofrom",
|
||||
"zerovec 0.10.4",
|
||||
"zerovec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -2890,25 +2813,6 @@ dependencies = [
|
||||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "intl-memoizer"
|
||||
version = "0.5.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "310da2e345f5eb861e7a07ee182262e94975051db9e4223e909ba90f392f163f"
|
||||
dependencies = [
|
||||
"type-map",
|
||||
"unic-langid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "intl_pluralrules"
|
||||
version = "7.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "078ea7b7c29a2b4df841a7f6ac8775ff6074020c6776d48491ce2268e068f972"
|
||||
dependencies = [
|
||||
"unic-langid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "inventory"
|
||||
version = "0.3.15"
|
||||
@ -3058,9 +2962,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.172"
|
||||
version = "0.2.168"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa"
|
||||
checksum = "5aaeb2981e0606ca11d79718f8bb01164f1d6ed75080182d3abf017e6d244b6d"
|
||||
|
||||
[[package]]
|
||||
name = "libflate"
|
||||
@ -3552,18 +3456,6 @@ dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nix"
|
||||
version = "0.30.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6"
|
||||
dependencies = [
|
||||
"bitflags 2.6.0",
|
||||
"cfg-if",
|
||||
"cfg_aliases 0.2.1",
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nom"
|
||||
version = "7.1.3"
|
||||
@ -3635,7 +3527,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nu"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
dependencies = [
|
||||
"assert_cmd",
|
||||
"crossterm",
|
||||
@ -3689,7 +3581,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nu-cli"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"crossterm",
|
||||
@ -3726,7 +3618,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nu-cmd-base"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
dependencies = [
|
||||
"indexmap",
|
||||
"miette",
|
||||
@ -3738,7 +3630,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nu-cmd-extra"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
dependencies = [
|
||||
"fancy-regex",
|
||||
"heck",
|
||||
@ -3764,7 +3656,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nu-cmd-lang"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
dependencies = [
|
||||
"itertools 0.14.0",
|
||||
"miette",
|
||||
@ -3780,7 +3672,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nu-cmd-plugin"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
dependencies = [
|
||||
"itertools 0.14.0",
|
||||
"nu-engine",
|
||||
@ -3791,7 +3683,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nu-color-config"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
dependencies = [
|
||||
"nu-ansi-term",
|
||||
"nu-engine",
|
||||
@ -3803,7 +3695,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nu-command"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
dependencies = [
|
||||
"alphanumeric-sort",
|
||||
"base64 0.22.1",
|
||||
@ -3920,7 +3812,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nu-derive-value"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
dependencies = [
|
||||
"heck",
|
||||
"proc-macro-error2",
|
||||
@ -3931,7 +3823,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nu-engine"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
dependencies = [
|
||||
"log",
|
||||
"nu-glob",
|
||||
@ -3942,9 +3834,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nu-explore"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
dependencies = [
|
||||
"ansi-str 0.8.0",
|
||||
"ansi-str",
|
||||
"anyhow",
|
||||
"crossterm",
|
||||
"log",
|
||||
@ -3966,14 +3858,14 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nu-glob"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
dependencies = [
|
||||
"doc-comment",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nu-json"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
dependencies = [
|
||||
"fancy-regex",
|
||||
"linked-hash-map",
|
||||
@ -3986,7 +3878,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nu-lsp"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
dependencies = [
|
||||
"assert-json-diff",
|
||||
"crossbeam-channel",
|
||||
@ -4013,7 +3905,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nu-parser"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
dependencies = [
|
||||
"bytesize",
|
||||
"chrono",
|
||||
@ -4030,7 +3922,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nu-path"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
dependencies = [
|
||||
"dirs",
|
||||
"omnipath",
|
||||
@ -4040,7 +3932,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nu-plugin"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
dependencies = [
|
||||
"log",
|
||||
"nix 0.29.0",
|
||||
@ -4056,7 +3948,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nu-plugin-core"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
dependencies = [
|
||||
"interprocess",
|
||||
"log",
|
||||
@ -4070,7 +3962,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nu-plugin-engine"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
dependencies = [
|
||||
"log",
|
||||
"nu-engine",
|
||||
@ -4086,7 +3978,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nu-plugin-protocol"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
dependencies = [
|
||||
"nu-protocol",
|
||||
"nu-utils",
|
||||
@ -4098,7 +3990,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nu-plugin-test-support"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
dependencies = [
|
||||
"nu-ansi-term",
|
||||
"nu-cmd-lang",
|
||||
@ -4116,7 +4008,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nu-pretty-hex"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
dependencies = [
|
||||
"heapless",
|
||||
"nu-ansi-term",
|
||||
@ -4125,7 +4017,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nu-protocol"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
dependencies = [
|
||||
"brotli",
|
||||
"bytes",
|
||||
@ -4166,7 +4058,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nu-std"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
dependencies = [
|
||||
"log",
|
||||
"miette",
|
||||
@ -4177,7 +4069,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nu-system"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"itertools 0.14.0",
|
||||
@ -4195,7 +4087,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nu-table"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
dependencies = [
|
||||
"fancy-regex",
|
||||
"nu-ansi-term",
|
||||
@ -4208,7 +4100,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nu-term-grid"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
dependencies = [
|
||||
"nu-utils",
|
||||
"unicode-width 0.2.0",
|
||||
@ -4216,7 +4108,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nu-test-support"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
dependencies = [
|
||||
"nu-glob",
|
||||
"nu-path",
|
||||
@ -4228,7 +4120,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nu-utils"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
dependencies = [
|
||||
"crossterm",
|
||||
"crossterm_winapi",
|
||||
@ -4257,7 +4149,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nu_plugin_example"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
dependencies = [
|
||||
"nu-cmd-lang",
|
||||
"nu-plugin",
|
||||
@ -4267,7 +4159,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nu_plugin_formats"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"eml-parser",
|
||||
@ -4282,7 +4174,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nu_plugin_gstat"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
dependencies = [
|
||||
"git2",
|
||||
"nu-plugin",
|
||||
@ -4291,7 +4183,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nu_plugin_inc"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
dependencies = [
|
||||
"nu-plugin",
|
||||
"nu-protocol",
|
||||
@ -4300,7 +4192,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nu_plugin_polars"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
dependencies = [
|
||||
"aws-config",
|
||||
"aws-credential-types",
|
||||
@ -4339,7 +4231,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nu_plugin_query"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
dependencies = [
|
||||
"gjson",
|
||||
"nu-plugin",
|
||||
@ -4354,7 +4246,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nu_plugin_stress_internals"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
dependencies = [
|
||||
"interprocess",
|
||||
"serde",
|
||||
@ -4416,7 +4308,7 @@ version = "0.4.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a652d9771a63711fd3c3deb670acfbe5c30a4072e664d7a3bf5a9e1056ac72c3"
|
||||
dependencies = [
|
||||
"arrayvec 0.7.6",
|
||||
"arrayvec",
|
||||
"itoa",
|
||||
]
|
||||
|
||||
@ -4478,7 +4370,7 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3"
|
||||
|
||||
[[package]]
|
||||
name = "nuon"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"nu-engine",
|
||||
@ -4773,8 +4665,8 @@ version = "0.17.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6978128c8b51d8f4080631ceb2302ab51e32cc6e8615f735ee2f83fd269ae3f1"
|
||||
dependencies = [
|
||||
"ansi-str 0.9.0",
|
||||
"ansitok 0.3.0",
|
||||
"ansi-str",
|
||||
"ansitok",
|
||||
"bytecount",
|
||||
"fnv",
|
||||
"unicode-width 0.2.0",
|
||||
@ -4820,9 +4712,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "parse_datetime"
|
||||
version = "0.9.0"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2fd3830b49ee3a0dcc8fdfadc68c6354c97d00101ac1cac5b2eee25d35c42066"
|
||||
checksum = "4bffd1156cebf13f681d7769924d3edfb9d9d71ba206a8d8e8e7eb9df4f4b1e7"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"nom 8.0.0",
|
||||
@ -6386,7 +6278,7 @@ version = "1.36.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b082d80e3e3cc52b2ed634388d436fe1f4de6af5786cc2de9ba9737527bdf555"
|
||||
dependencies = [
|
||||
"arrayvec 0.7.6",
|
||||
"arrayvec",
|
||||
"num-traits",
|
||||
]
|
||||
|
||||
@ -6698,12 +6590,6 @@ dependencies = [
|
||||
"smallvec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "self_cell"
|
||||
version = "1.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0f7d95a54511e0c7be3f51e8867aa8cf35148d7b9445d44de2f943e2b206e749"
|
||||
|
||||
[[package]]
|
||||
name = "semver"
|
||||
version = "1.0.23"
|
||||
@ -7251,8 +7137,8 @@ version = "0.20.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e39a2ee1fbcd360805a771e1b300f78cc88fec7b8d3e2f71cd37bbf23e725c7d"
|
||||
dependencies = [
|
||||
"ansi-str 0.9.0",
|
||||
"ansitok 0.3.0",
|
||||
"ansi-str",
|
||||
"ansitok",
|
||||
"papergrid",
|
||||
"testing_table",
|
||||
]
|
||||
@ -7333,7 +7219,7 @@ version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0f8daae29995a24f65619e19d8d31dea5b389f3d853d8bf297bbf607cd0014cc"
|
||||
dependencies = [
|
||||
"ansitok 0.3.0",
|
||||
"ansitok",
|
||||
"unicode-width 0.2.0",
|
||||
]
|
||||
|
||||
@ -7446,17 +7332,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f"
|
||||
dependencies = [
|
||||
"displaydoc",
|
||||
"zerovec 0.10.4",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tinystr"
|
||||
version = "0.8.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5d4f6d1145dcb577acf783d4e601bc1d76a13337bb54e6233add580b07344c8b"
|
||||
dependencies = [
|
||||
"displaydoc",
|
||||
"zerovec 0.11.2",
|
||||
"zerovec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -7476,9 +7352,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
|
||||
|
||||
[[package]]
|
||||
name = "titlecase"
|
||||
version = "3.5.0"
|
||||
version = "3.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a1fad07d425f7245932d6deb5009e2c83d9642617b47750ffc3363815e269435"
|
||||
checksum = "eb567088a91d59b492520c8149e2be5ce10d5deb2d9a383f3378df3259679d40"
|
||||
dependencies = [
|
||||
"regex",
|
||||
]
|
||||
@ -7670,15 +7546,6 @@ version = "0.2.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
|
||||
|
||||
[[package]]
|
||||
name = "type-map"
|
||||
version = "0.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cb30dbbd9036155e74adad6812e9898d03ec374946234fbcebd5dfc7b9187b90"
|
||||
dependencies = [
|
||||
"rustc-hash 2.1.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "typed-arena"
|
||||
version = "1.7.0"
|
||||
@ -7762,24 +7629,6 @@ dependencies = [
|
||||
"thiserror 1.0.69",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unic-langid"
|
||||
version = "0.9.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a28ba52c9b05311f4f6e62d5d9d46f094bd6e84cb8df7b3ef952748d752a7d05"
|
||||
dependencies = [
|
||||
"unic-langid-impl",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unic-langid-impl"
|
||||
version = "0.9.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dce1bf08044d4b7a94028c93786f8566047edc11110595914de93362559bc658"
|
||||
dependencies = [
|
||||
"tinystr 0.8.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unicase"
|
||||
version = "2.8.0"
|
||||
@ -7941,15 +7790,14 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
|
||||
|
||||
[[package]]
|
||||
name = "uu_cp"
|
||||
version = "0.1.0"
|
||||
version = "0.0.30"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4f03348f1609e6646274195ba7674c20ce3ff18a358649516fdbb4ad2645df41"
|
||||
checksum = "bf2f3906b7896f79519055d36760095577373e40ec244f46b259f502a4a91147"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"filetime",
|
||||
"indicatif",
|
||||
"libc",
|
||||
"linux-raw-sys 0.9.4",
|
||||
"quick-error 2.0.1",
|
||||
"uucore",
|
||||
"walkdir",
|
||||
@ -7958,9 +7806,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "uu_mkdir"
|
||||
version = "0.1.0"
|
||||
version = "0.0.30"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d3f88c0d90729946efdd5e28bff263da25b08c632aecee8b5797059a23374525"
|
||||
checksum = "5be556a5d852f55b92bba460d7a97030a340ba4a3f4c510a8d0a893bfaf48356"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"uucore",
|
||||
@ -7968,9 +7816,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "uu_mktemp"
|
||||
version = "0.1.0"
|
||||
version = "0.0.30"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1a13a85cf62ae1292d5cfc21de90a33bb853ade4151ead38e022ce8b610d3ee5"
|
||||
checksum = "5305fcf4f7f480e7438e19ff433ae60dea886bd528f87543029eb6b95d351afc"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"rand 0.9.0",
|
||||
@ -7981,9 +7829,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "uu_mv"
|
||||
version = "0.1.0"
|
||||
version = "0.0.30"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2a627a8ca00422f5341ca89d4c1fd352622cdab7dd4070a675616474ee37b351"
|
||||
checksum = "3be214b96554e4f7aa079b26c86c3ecf1b9ea15023ca2ec62d608273d12c7049"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"fs_extra",
|
||||
@ -7996,9 +7844,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "uu_touch"
|
||||
version = "0.1.0"
|
||||
version = "0.0.30"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "60e075c2a3644470352ec759be520febb1efb5fb8e448f05a0d2045d469f0e7b"
|
||||
checksum = "1e58581a0245de8e3ef75b115ab29592cfb60d4851149d4951604601d14ea420"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"clap",
|
||||
@ -8011,9 +7859,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "uu_uname"
|
||||
version = "0.1.0"
|
||||
version = "0.0.30"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "419f77c20ae220ee3fdf663de0600f954b5cc4f8b23e442192be73a1b45cfd03"
|
||||
checksum = "324d96a21da91a81be334206ab65aad16d164d34cddeb640e1c56cd8d1854dd4"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"platform-info",
|
||||
@ -8022,34 +7870,32 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "uu_whoami"
|
||||
version = "0.1.0"
|
||||
version = "0.0.30"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "083f92042620f07043a400e6192ddfcacdaee30ba9903f4cb86c9df11c625cc6"
|
||||
checksum = "bee254de8b172a5978f12fe6cd9d4f2b60ea9ef1e37f0cb53bfee2c993b3e96a"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"libc",
|
||||
"uucore",
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "uucore"
|
||||
version = "0.1.0"
|
||||
version = "0.0.30"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9032bf981784f22fcc5ddc7e74b7cf3bae3d5f44a48d2054138ed38068b9f4e0"
|
||||
checksum = "71f4e82877d06de779c611a3d54720f56f1e68b228fb30a5b6c66ef07e68263d"
|
||||
dependencies = [
|
||||
"bigdecimal",
|
||||
"chrono",
|
||||
"chrono-tz",
|
||||
"clap",
|
||||
"dunce",
|
||||
"fluent",
|
||||
"fluent-bundle",
|
||||
"glob",
|
||||
"iana-time-zone",
|
||||
"libc",
|
||||
"nix 0.30.1",
|
||||
"num-traits",
|
||||
"nix 0.29.0",
|
||||
"number_prefix",
|
||||
"os_display",
|
||||
"thiserror 2.0.12",
|
||||
"unic-langid",
|
||||
"uucore_procs",
|
||||
"walkdir",
|
||||
"wild",
|
||||
@ -8060,9 +7906,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "uucore_procs"
|
||||
version = "0.1.0"
|
||||
version = "0.0.30"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c933945fdac5b7779eae1fc746146e61f5b0298deb6ede002ce0b6e93e1b3bfc"
|
||||
checksum = "c72435859e812e602e225dea48d014abb6b1072220a8d44f2fe0565553b1f7e4"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@ -8071,9 +7917,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "uuhelp_parser"
|
||||
version = "0.1.0"
|
||||
version = "0.0.30"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "beda381dd5c7927f8682f50b055b0903bb694ba5a4b27fad1b4934bc4fbf7b8d"
|
||||
checksum = "0bb6d972f580f8223cb7052d8580aea2b7061e368cf476de32ea9457b19459ed"
|
||||
|
||||
[[package]]
|
||||
name = "uuid"
|
||||
@ -8124,17 +7970,6 @@ version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5c3082ca00d5a5ef149bb8b555a72ae84c9c59f7250f013ac822ac2e49b19c64"
|
||||
|
||||
[[package]]
|
||||
name = "vte"
|
||||
version = "0.10.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6cbce692ab4ca2f1f3047fcf732430249c0e971bfdd2b234cf2c47ad93af5983"
|
||||
dependencies = [
|
||||
"arrayvec 0.5.2",
|
||||
"utf8parse",
|
||||
"vte_generate_state_changes",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "vte"
|
||||
version = "0.11.1"
|
||||
@ -8151,7 +7986,7 @@ version = "0.14.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "231fdcd7ef3037e8330d8e17e61011a2c244126acc0a982f4040ac3f9f0bc077"
|
||||
dependencies = [
|
||||
"arrayvec 0.7.6",
|
||||
"arrayvec",
|
||||
"memchr",
|
||||
]
|
||||
|
||||
@ -8430,13 +8265,13 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "which"
|
||||
version = "7.0.0"
|
||||
version = "7.0.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c9cad3279ade7346b96e38731a641d7343dd6a53d55083dd54eadfa5a1b38c6b"
|
||||
checksum = "24d643ce3fd3e5b54854602a080f34fb10ab75e0b813ee32d00ca2b44fa74762"
|
||||
dependencies = [
|
||||
"either",
|
||||
"home",
|
||||
"rustix 0.38.42",
|
||||
"env_home",
|
||||
"rustix 1.0.7",
|
||||
"winsafe",
|
||||
]
|
||||
|
||||
@ -8583,12 +8418,6 @@ dependencies = [
|
||||
"syn 2.0.90",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-link"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38"
|
||||
|
||||
[[package]]
|
||||
name = "windows-registry"
|
||||
version = "0.2.0"
|
||||
@ -9012,15 +8841,6 @@ dependencies = [
|
||||
"zerovec-derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zerovec"
|
||||
version = "0.11.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4a05eb080e015ba39cc9e23bbe5e7fb04d5fb040350f99f34e338d5fdd294428"
|
||||
dependencies = [
|
||||
"zerofrom",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zerovec-derive"
|
||||
version = "0.10.3"
|
||||
|
62
Cargo.toml
62
Cargo.toml
@ -11,7 +11,7 @@ license = "MIT"
|
||||
name = "nu"
|
||||
repository = "https://github.com/nushell/nushell"
|
||||
rust-version = "1.85.1"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
@ -63,7 +63,7 @@ members = [
|
||||
|
||||
[workspace.dependencies]
|
||||
alphanumeric-sort = "1.5"
|
||||
ansi-str = "0.8"
|
||||
ansi-str = "0.9"
|
||||
anyhow = "1.0.82"
|
||||
base64 = "0.22.1"
|
||||
bracoxide = "0.1.6"
|
||||
@ -163,7 +163,7 @@ syn = "2.0"
|
||||
sysinfo = "0.33"
|
||||
tabled = { version = "0.20", default-features = false }
|
||||
tempfile = "3.20"
|
||||
titlecase = "3.5"
|
||||
titlecase = "3.6"
|
||||
toml = "0.8"
|
||||
trash = "5.2"
|
||||
update-informer = { version = "1.2.0", default-features = false, features = ["github", "ureq"] }
|
||||
@ -172,19 +172,19 @@ unicode-segmentation = "1.12"
|
||||
unicode-width = "0.2"
|
||||
ureq = { version = "2.12", default-features = false, features = ["socks-proxy"] }
|
||||
url = "2.2"
|
||||
uu_cp = "0.1.0"
|
||||
uu_mkdir = "0.1.0"
|
||||
uu_mktemp = "0.1.0"
|
||||
uu_mv = "0.1.0"
|
||||
uu_touch = "0.1.0"
|
||||
uu_whoami = "0.1.0"
|
||||
uu_uname = "0.1.0"
|
||||
uucore = "0.1.0"
|
||||
uu_cp = "0.0.30"
|
||||
uu_mkdir = "0.0.30"
|
||||
uu_mktemp = "0.0.30"
|
||||
uu_mv = "0.0.30"
|
||||
uu_touch = "0.0.30"
|
||||
uu_whoami = "0.0.30"
|
||||
uu_uname = "0.0.30"
|
||||
uucore = "0.0.30"
|
||||
uuid = "1.16.0"
|
||||
v_htmlescape = "0.15.0"
|
||||
wax = "0.6"
|
||||
web-time = "1.1.0"
|
||||
which = "7.0.0"
|
||||
which = "7.0.3"
|
||||
windows = "0.56"
|
||||
windows-sys = "0.48"
|
||||
winreg = "0.52"
|
||||
@ -200,22 +200,22 @@ unchecked_duration_subtraction = "warn"
|
||||
workspace = true
|
||||
|
||||
[dependencies]
|
||||
nu-cli = { path = "./crates/nu-cli", version = "0.105.0" }
|
||||
nu-cmd-base = { path = "./crates/nu-cmd-base", version = "0.105.0" }
|
||||
nu-cmd-lang = { path = "./crates/nu-cmd-lang", version = "0.105.0" }
|
||||
nu-cmd-plugin = { path = "./crates/nu-cmd-plugin", version = "0.105.0", optional = true }
|
||||
nu-cmd-extra = { path = "./crates/nu-cmd-extra", version = "0.105.0" }
|
||||
nu-command = { path = "./crates/nu-command", version = "0.105.0", default-features = false, features = ["os"] }
|
||||
nu-engine = { path = "./crates/nu-engine", version = "0.105.0" }
|
||||
nu-explore = { path = "./crates/nu-explore", version = "0.105.0" }
|
||||
nu-lsp = { path = "./crates/nu-lsp/", version = "0.105.0" }
|
||||
nu-parser = { path = "./crates/nu-parser", version = "0.105.0" }
|
||||
nu-path = { path = "./crates/nu-path", version = "0.105.0" }
|
||||
nu-plugin-engine = { path = "./crates/nu-plugin-engine", optional = true, version = "0.105.0" }
|
||||
nu-protocol = { path = "./crates/nu-protocol", version = "0.105.0" }
|
||||
nu-std = { path = "./crates/nu-std", version = "0.105.0" }
|
||||
nu-system = { path = "./crates/nu-system", version = "0.105.0" }
|
||||
nu-utils = { path = "./crates/nu-utils", version = "0.105.0" }
|
||||
nu-cli = { path = "./crates/nu-cli", version = "0.105.2" }
|
||||
nu-cmd-base = { path = "./crates/nu-cmd-base", version = "0.105.2" }
|
||||
nu-cmd-lang = { path = "./crates/nu-cmd-lang", version = "0.105.2" }
|
||||
nu-cmd-plugin = { path = "./crates/nu-cmd-plugin", version = "0.105.2", optional = true }
|
||||
nu-cmd-extra = { path = "./crates/nu-cmd-extra", version = "0.105.2" }
|
||||
nu-command = { path = "./crates/nu-command", version = "0.105.2", default-features = false, features = ["os"] }
|
||||
nu-engine = { path = "./crates/nu-engine", version = "0.105.2" }
|
||||
nu-explore = { path = "./crates/nu-explore", version = "0.105.2" }
|
||||
nu-lsp = { path = "./crates/nu-lsp/", version = "0.105.2" }
|
||||
nu-parser = { path = "./crates/nu-parser", version = "0.105.2" }
|
||||
nu-path = { path = "./crates/nu-path", version = "0.105.2" }
|
||||
nu-plugin-engine = { path = "./crates/nu-plugin-engine", optional = true, version = "0.105.2" }
|
||||
nu-protocol = { path = "./crates/nu-protocol", version = "0.105.2" }
|
||||
nu-std = { path = "./crates/nu-std", version = "0.105.2" }
|
||||
nu-system = { path = "./crates/nu-system", version = "0.105.2" }
|
||||
nu-utils = { path = "./crates/nu-utils", version = "0.105.2" }
|
||||
reedline = { workspace = true, features = ["bashisms", "sqlite"] }
|
||||
|
||||
crossterm = { workspace = true }
|
||||
@ -244,9 +244,9 @@ nix = { workspace = true, default-features = false, features = [
|
||||
] }
|
||||
|
||||
[dev-dependencies]
|
||||
nu-test-support = { path = "./crates/nu-test-support", version = "0.105.0" }
|
||||
nu-plugin-protocol = { path = "./crates/nu-plugin-protocol", version = "0.105.0" }
|
||||
nu-plugin-core = { path = "./crates/nu-plugin-core", version = "0.105.0" }
|
||||
nu-test-support = { path = "./crates/nu-test-support", version = "0.105.2" }
|
||||
nu-plugin-protocol = { path = "./crates/nu-plugin-protocol", version = "0.105.2" }
|
||||
nu-plugin-core = { path = "./crates/nu-plugin-core", version = "0.105.2" }
|
||||
assert_cmd = "2.0"
|
||||
dirs = { workspace = true }
|
||||
tango-bench = "0.6"
|
||||
|
@ -5,29 +5,29 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-cli"
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
name = "nu-cli"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
|
||||
[lib]
|
||||
bench = false
|
||||
|
||||
[dev-dependencies]
|
||||
nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.105.0" }
|
||||
nu-command = { path = "../nu-command", version = "0.105.0" }
|
||||
nu-std = { path = "../nu-std", version = "0.105.0" }
|
||||
nu-test-support = { path = "../nu-test-support", version = "0.105.0" }
|
||||
nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.105.2" }
|
||||
nu-command = { path = "../nu-command", version = "0.105.2" }
|
||||
nu-std = { path = "../nu-std", version = "0.105.2" }
|
||||
nu-test-support = { path = "../nu-test-support", version = "0.105.2" }
|
||||
rstest = { workspace = true, default-features = false }
|
||||
tempfile = { workspace = true }
|
||||
|
||||
[dependencies]
|
||||
nu-cmd-base = { path = "../nu-cmd-base", version = "0.105.0" }
|
||||
nu-engine = { path = "../nu-engine", version = "0.105.0", features = ["os"] }
|
||||
nu-glob = { path = "../nu-glob", version = "0.105.0" }
|
||||
nu-path = { path = "../nu-path", version = "0.105.0" }
|
||||
nu-parser = { path = "../nu-parser", version = "0.105.0" }
|
||||
nu-plugin-engine = { path = "../nu-plugin-engine", version = "0.105.0", optional = true }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.0", features = ["os"] }
|
||||
nu-utils = { path = "../nu-utils", version = "0.105.0" }
|
||||
nu-color-config = { path = "../nu-color-config", version = "0.105.0" }
|
||||
nu-cmd-base = { path = "../nu-cmd-base", version = "0.105.2" }
|
||||
nu-engine = { path = "../nu-engine", version = "0.105.2", features = ["os"] }
|
||||
nu-glob = { path = "../nu-glob", version = "0.105.2" }
|
||||
nu-path = { path = "../nu-path", version = "0.105.2" }
|
||||
nu-parser = { path = "../nu-parser", version = "0.105.2" }
|
||||
nu-plugin-engine = { path = "../nu-plugin-engine", version = "0.105.2", optional = true }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.2", features = ["os"] }
|
||||
nu-utils = { path = "../nu-utils", version = "0.105.2" }
|
||||
nu-color-config = { path = "../nu-color-config", version = "0.105.2" }
|
||||
nu-ansi-term = { workspace = true }
|
||||
reedline = { workspace = true, features = ["bashisms", "sqlite"] }
|
||||
|
||||
|
@ -5,7 +5,7 @@ edition = "2024"
|
||||
license = "MIT"
|
||||
name = "nu-cmd-base"
|
||||
repository = "https://github.com/nushell/nushell/tree/main/crates/nu-cmd-base"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
@ -13,10 +13,10 @@ version = "0.105.0"
|
||||
workspace = true
|
||||
|
||||
[dependencies]
|
||||
nu-engine = { path = "../nu-engine", version = "0.105.0", default-features = false }
|
||||
nu-parser = { path = "../nu-parser", version = "0.105.0" }
|
||||
nu-path = { path = "../nu-path", version = "0.105.0" }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.0", default-features = false }
|
||||
nu-engine = { path = "../nu-engine", version = "0.105.2", default-features = false }
|
||||
nu-parser = { path = "../nu-parser", version = "0.105.2" }
|
||||
nu-path = { path = "../nu-path", version = "0.105.2" }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.2", default-features = false }
|
||||
|
||||
indexmap = { workspace = true }
|
||||
miette = { workspace = true }
|
||||
|
@ -5,7 +5,7 @@ edition = "2024"
|
||||
license = "MIT"
|
||||
name = "nu-cmd-extra"
|
||||
repository = "https://github.com/nushell/nushell/tree/main/crates/nu-cmd-extra"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
@ -16,13 +16,13 @@ bench = false
|
||||
workspace = true
|
||||
|
||||
[dependencies]
|
||||
nu-cmd-base = { path = "../nu-cmd-base", version = "0.105.0" }
|
||||
nu-engine = { path = "../nu-engine", version = "0.105.0", default-features = false }
|
||||
nu-json = { version = "0.105.0", path = "../nu-json" }
|
||||
nu-parser = { path = "../nu-parser", version = "0.105.0" }
|
||||
nu-pretty-hex = { version = "0.105.0", path = "../nu-pretty-hex" }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.0", default-features = false }
|
||||
nu-utils = { path = "../nu-utils", version = "0.105.0", default-features = false }
|
||||
nu-cmd-base = { path = "../nu-cmd-base", version = "0.105.2" }
|
||||
nu-engine = { path = "../nu-engine", version = "0.105.2", default-features = false }
|
||||
nu-json = { version = "0.105.2", path = "../nu-json" }
|
||||
nu-parser = { path = "../nu-parser", version = "0.105.2" }
|
||||
nu-pretty-hex = { version = "0.105.2", path = "../nu-pretty-hex" }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.2", default-features = false }
|
||||
nu-utils = { path = "../nu-utils", version = "0.105.2", default-features = false }
|
||||
|
||||
# Potential dependencies for extras
|
||||
heck = { workspace = true }
|
||||
@ -37,6 +37,6 @@ itertools = { workspace = true }
|
||||
mime = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.105.0" }
|
||||
nu-command = { path = "../nu-command", version = "0.105.0" }
|
||||
nu-test-support = { path = "../nu-test-support", version = "0.105.0" }
|
||||
nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.105.2" }
|
||||
nu-command = { path = "../nu-command", version = "0.105.2" }
|
||||
nu-test-support = { path = "../nu-test-support", version = "0.105.2" }
|
||||
|
@ -6,7 +6,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-cmd-lang"
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
name = "nu-cmd-lang"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
|
||||
[lib]
|
||||
bench = false
|
||||
@ -15,11 +15,11 @@ bench = false
|
||||
workspace = true
|
||||
|
||||
[dependencies]
|
||||
nu-engine = { path = "../nu-engine", version = "0.105.0", default-features = false }
|
||||
nu-parser = { path = "../nu-parser", version = "0.105.0" }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.0", default-features = false }
|
||||
nu-utils = { path = "../nu-utils", version = "0.105.0", default-features = false }
|
||||
nu-cmd-base = { path = "../nu-cmd-base", version = "0.105.0" }
|
||||
nu-engine = { path = "../nu-engine", version = "0.105.2", default-features = false }
|
||||
nu-parser = { path = "../nu-parser", version = "0.105.2" }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.2", default-features = false }
|
||||
nu-utils = { path = "../nu-utils", version = "0.105.2", default-features = false }
|
||||
nu-cmd-base = { path = "../nu-cmd-base", version = "0.105.2" }
|
||||
|
||||
itertools = { workspace = true }
|
||||
shadow-rs = { version = "1.1", default-features = false }
|
||||
|
@ -86,12 +86,16 @@ impl Command for OverlayHide {
|
||||
vec![]
|
||||
};
|
||||
|
||||
// also restore env vars which has been hidden
|
||||
let env_vars_to_restore = stack.get_hidden_env_vars(&overlay_name.item, engine_state);
|
||||
stack.remove_overlay(&overlay_name.item);
|
||||
for (name, val) in env_vars_to_restore {
|
||||
stack.add_env_var(name, val);
|
||||
}
|
||||
|
||||
for (name, val) in env_vars_to_keep {
|
||||
stack.add_env_var(name, val);
|
||||
}
|
||||
|
||||
Ok(PipelineData::empty())
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,7 @@ edition = "2024"
|
||||
license = "MIT"
|
||||
name = "nu-cmd-plugin"
|
||||
repository = "https://github.com/nushell/nushell/tree/main/crates/nu-cmd-plugin"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
@ -13,10 +13,10 @@ version = "0.105.0"
|
||||
workspace = true
|
||||
|
||||
[dependencies]
|
||||
nu-engine = { path = "../nu-engine", version = "0.105.0" }
|
||||
nu-path = { path = "../nu-path", version = "0.105.0" }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.0", features = ["plugin"] }
|
||||
nu-plugin-engine = { path = "../nu-plugin-engine", version = "0.105.0" }
|
||||
nu-engine = { path = "../nu-engine", version = "0.105.2" }
|
||||
nu-path = { path = "../nu-path", version = "0.105.2" }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.2", features = ["plugin"] }
|
||||
nu-plugin-engine = { path = "../nu-plugin-engine", version = "0.105.2" }
|
||||
|
||||
itertools = { workspace = true }
|
||||
|
||||
|
@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-color-confi
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
name = "nu-color-config"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
|
||||
[lib]
|
||||
bench = false
|
||||
@ -14,12 +14,12 @@ bench = false
|
||||
workspace = true
|
||||
|
||||
[dependencies]
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.0", default-features = false }
|
||||
nu-engine = { path = "../nu-engine", version = "0.105.0", default-features = false }
|
||||
nu-json = { path = "../nu-json", version = "0.105.0" }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.2", default-features = false }
|
||||
nu-engine = { path = "../nu-engine", version = "0.105.2", default-features = false }
|
||||
nu-json = { path = "../nu-json", version = "0.105.2" }
|
||||
nu-ansi-term = { workspace = true }
|
||||
|
||||
serde = { workspace = true, features = ["derive"] }
|
||||
|
||||
[dev-dependencies]
|
||||
nu-test-support = { path = "../nu-test-support", version = "0.105.0" }
|
||||
nu-test-support = { path = "../nu-test-support", version = "0.105.2" }
|
||||
|
@ -5,7 +5,7 @@ edition = "2024"
|
||||
license = "MIT"
|
||||
name = "nu-command"
|
||||
repository = "https://github.com/nushell/nushell/tree/main/crates/nu-command"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
@ -16,21 +16,21 @@ bench = false
|
||||
workspace = true
|
||||
|
||||
[dependencies]
|
||||
nu-cmd-base = { path = "../nu-cmd-base", version = "0.105.0" }
|
||||
nu-color-config = { path = "../nu-color-config", version = "0.105.0" }
|
||||
nu-engine = { path = "../nu-engine", version = "0.105.0", default-features = false }
|
||||
nu-glob = { path = "../nu-glob", version = "0.105.0" }
|
||||
nu-json = { path = "../nu-json", version = "0.105.0" }
|
||||
nu-parser = { path = "../nu-parser", version = "0.105.0" }
|
||||
nu-path = { path = "../nu-path", version = "0.105.0" }
|
||||
nu-pretty-hex = { path = "../nu-pretty-hex", version = "0.105.0" }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.0", default-features = false }
|
||||
nu-system = { path = "../nu-system", version = "0.105.0" }
|
||||
nu-table = { path = "../nu-table", version = "0.105.0" }
|
||||
nu-term-grid = { path = "../nu-term-grid", version = "0.105.0" }
|
||||
nu-utils = { path = "../nu-utils", version = "0.105.0", default-features = false }
|
||||
nu-cmd-base = { path = "../nu-cmd-base", version = "0.105.2" }
|
||||
nu-color-config = { path = "../nu-color-config", version = "0.105.2" }
|
||||
nu-engine = { path = "../nu-engine", version = "0.105.2", default-features = false }
|
||||
nu-glob = { path = "../nu-glob", version = "0.105.2" }
|
||||
nu-json = { path = "../nu-json", version = "0.105.2" }
|
||||
nu-parser = { path = "../nu-parser", version = "0.105.2" }
|
||||
nu-path = { path = "../nu-path", version = "0.105.2" }
|
||||
nu-pretty-hex = { path = "../nu-pretty-hex", version = "0.105.2" }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.2", default-features = false }
|
||||
nu-system = { path = "../nu-system", version = "0.105.2" }
|
||||
nu-table = { path = "../nu-table", version = "0.105.2" }
|
||||
nu-term-grid = { path = "../nu-term-grid", version = "0.105.2" }
|
||||
nu-utils = { path = "../nu-utils", version = "0.105.2", default-features = false }
|
||||
nu-ansi-term = { workspace = true }
|
||||
nuon = { path = "../nuon", version = "0.105.0" }
|
||||
nuon = { path = "../nuon", version = "0.105.2" }
|
||||
|
||||
alphanumeric-sort = { workspace = true }
|
||||
base64 = { workspace = true }
|
||||
@ -226,8 +226,8 @@ sqlite = ["rusqlite"]
|
||||
trash-support = ["trash"]
|
||||
|
||||
[dev-dependencies]
|
||||
nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.105.0" }
|
||||
nu-test-support = { path = "../nu-test-support", version = "0.105.0" }
|
||||
nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.105.2" }
|
||||
nu-test-support = { path = "../nu-test-support", version = "0.105.2" }
|
||||
|
||||
dirs = { workspace = true }
|
||||
mockito = { workspace = true, default-features = false }
|
||||
|
@ -119,9 +119,9 @@ impl Command for UCp {
|
||||
) -> Result<PipelineData, ShellError> {
|
||||
let interactive = call.has_flag(engine_state, stack, "interactive")?;
|
||||
let (update, copy_mode) = if call.has_flag(engine_state, stack, "update")? {
|
||||
(UpdateMode::IfOlder, CopyMode::Update)
|
||||
(UpdateMode::ReplaceIfOlder, CopyMode::Update)
|
||||
} else {
|
||||
(UpdateMode::All, CopyMode::Copy)
|
||||
(UpdateMode::ReplaceAll, CopyMode::Copy)
|
||||
};
|
||||
|
||||
let force = call.has_flag(engine_state, stack, "force")?;
|
||||
@ -252,7 +252,7 @@ impl Command for UCp {
|
||||
dereference: !recursive,
|
||||
progress_bar: progress,
|
||||
attributes_only: false,
|
||||
backup: BackupMode::None,
|
||||
backup: BackupMode::NoBackup,
|
||||
copy_contents: false,
|
||||
cli_dereference: false,
|
||||
copy_mode,
|
||||
@ -264,8 +264,6 @@ impl Command for UCp {
|
||||
backup_suffix: String::from("~"),
|
||||
target_dir: None,
|
||||
update,
|
||||
set_selinux_context: false,
|
||||
context: None,
|
||||
};
|
||||
|
||||
if let Err(error) = uu_cp::copy(&sources, &target_path, &options) {
|
||||
|
@ -74,16 +74,8 @@ impl Command for UMkdir {
|
||||
});
|
||||
}
|
||||
|
||||
let config = uu_mkdir::Config {
|
||||
recursive: IS_RECURSIVE,
|
||||
mode: get_mode(),
|
||||
verbose: is_verbose,
|
||||
set_selinux_context: false,
|
||||
context: None,
|
||||
};
|
||||
|
||||
for dir in directories {
|
||||
if let Err(error) = mkdir(&dir, &config) {
|
||||
if let Err(error) = mkdir(&dir, IS_RECURSIVE, get_mode(), is_verbose) {
|
||||
return Err(ShellError::GenericError {
|
||||
error: format!("{}", error),
|
||||
msg: format!("{}", error),
|
||||
|
@ -95,9 +95,9 @@ impl Command for UMv {
|
||||
uu_mv::OverwriteMode::Force
|
||||
};
|
||||
let update = if call.has_flag(engine_state, stack, "update")? {
|
||||
UpdateMode::IfOlder
|
||||
UpdateMode::ReplaceIfOlder
|
||||
} else {
|
||||
UpdateMode::All
|
||||
UpdateMode::ReplaceAll
|
||||
};
|
||||
|
||||
#[allow(deprecated)]
|
||||
@ -186,7 +186,7 @@ impl Command for UMv {
|
||||
progress_bar: progress,
|
||||
verbose,
|
||||
suffix: String::from("~"),
|
||||
backup: BackupMode::None,
|
||||
backup: BackupMode::NoBackup,
|
||||
update,
|
||||
target_dir: None,
|
||||
no_target_dir: false,
|
||||
|
@ -68,16 +68,40 @@ impl Command for HelpOperators {
|
||||
]
|
||||
.into_iter()
|
||||
.map(|op| {
|
||||
Value::record(
|
||||
record! {
|
||||
"type" => Value::string(op_type(&op), head),
|
||||
"operator" => Value::string(op.to_string(), head),
|
||||
"name" => Value::string(name(&op), head),
|
||||
"description" => Value::string(description(&op), head),
|
||||
"precedence" => Value::int(op.precedence().into(), head),
|
||||
},
|
||||
head,
|
||||
)
|
||||
if op == Operator::Comparison(Comparison::RegexMatch) {
|
||||
Value::record(
|
||||
record! {
|
||||
"type" => Value::string(op_type(&op), head),
|
||||
"operator" => Value::string("=~, like", head),
|
||||
"name" => Value::string(name(&op), head),
|
||||
"description" => Value::string(description(&op), head),
|
||||
"precedence" => Value::int(op.precedence().into(), head),
|
||||
},
|
||||
head,
|
||||
)
|
||||
} else if op == Operator::Comparison(Comparison::NotRegexMatch) {
|
||||
Value::record(
|
||||
record! {
|
||||
"type" => Value::string(op_type(&op), head),
|
||||
"operator" => Value::string("!~, not-like", head),
|
||||
"name" => Value::string(name(&op), head),
|
||||
"description" => Value::string(description(&op), head),
|
||||
"precedence" => Value::int(op.precedence().into(), head),
|
||||
},
|
||||
head,
|
||||
)
|
||||
} else {
|
||||
Value::record(
|
||||
record! {
|
||||
"type" => Value::string(op_type(&op), head),
|
||||
"operator" => Value::string(op.to_string(), head),
|
||||
"name" => Value::string(name(&op), head),
|
||||
"description" => Value::string(description(&op), head),
|
||||
"precedence" => Value::int(op.precedence().into(), head),
|
||||
},
|
||||
head,
|
||||
)
|
||||
}
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
|
@ -275,11 +275,8 @@ impl Command for External {
|
||||
);
|
||||
|
||||
let mut child = child.map_err(|err| {
|
||||
IoError::new_internal(
|
||||
err,
|
||||
"Could not spawn foreground child",
|
||||
nu_protocol::location!(),
|
||||
)
|
||||
let context = format!("Could not spawn foreground child: {err}");
|
||||
IoError::new_internal(err, context, nu_protocol::location!())
|
||||
})?;
|
||||
|
||||
if let Some(thread_job) = engine_state.current_thread_job() {
|
||||
|
@ -5,7 +5,7 @@ edition = "2024"
|
||||
license = "MIT"
|
||||
name = "nu-derive-value"
|
||||
repository = "https://github.com/nushell/nushell/tree/main/crates/nu-derive-value"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
|
||||
[lib]
|
||||
proc-macro = true
|
||||
|
@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-engine"
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
name = "nu-engine"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
|
||||
[lib]
|
||||
bench = false
|
||||
@ -14,10 +14,10 @@ bench = false
|
||||
workspace = true
|
||||
|
||||
[dependencies]
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.0", default-features = false }
|
||||
nu-path = { path = "../nu-path", version = "0.105.0" }
|
||||
nu-glob = { path = "../nu-glob", version = "0.105.0" }
|
||||
nu-utils = { path = "../nu-utils", version = "0.105.0", default-features = false }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.2", default-features = false }
|
||||
nu-path = { path = "../nu-path", version = "0.105.2" }
|
||||
nu-glob = { path = "../nu-glob", version = "0.105.2" }
|
||||
nu-utils = { path = "../nu-utils", version = "0.105.2", default-features = false }
|
||||
log = { workspace = true }
|
||||
|
||||
[features]
|
||||
|
@ -1,7 +1,6 @@
|
||||
use crate::eval_ir_block;
|
||||
#[allow(deprecated)]
|
||||
use crate::get_full_help;
|
||||
use nu_path::{AbsolutePathBuf, expand_path_with};
|
||||
use nu_protocol::{
|
||||
BlockId, Config, DataSource, ENV_VARIABLE_ID, IntoPipelineData, PipelineData, PipelineMetadata,
|
||||
ShellError, Span, Value, VarId,
|
||||
@ -404,45 +403,6 @@ impl Eval for EvalRuntime {
|
||||
stack.get_config(engine_state)
|
||||
}
|
||||
|
||||
fn eval_filepath(
|
||||
engine_state: &EngineState,
|
||||
stack: &mut Stack,
|
||||
path: String,
|
||||
quoted: bool,
|
||||
span: Span,
|
||||
) -> Result<Value, ShellError> {
|
||||
if quoted {
|
||||
Ok(Value::string(path, span))
|
||||
} else {
|
||||
let cwd = engine_state.cwd(Some(stack))?;
|
||||
let path = expand_path_with(path, cwd, true);
|
||||
|
||||
Ok(Value::string(path.to_string_lossy(), span))
|
||||
}
|
||||
}
|
||||
|
||||
fn eval_directory(
|
||||
engine_state: Self::State<'_>,
|
||||
stack: &mut Self::MutState,
|
||||
path: String,
|
||||
quoted: bool,
|
||||
span: Span,
|
||||
) -> Result<Value, ShellError> {
|
||||
if path == "-" {
|
||||
Ok(Value::string("-", span))
|
||||
} else if quoted {
|
||||
Ok(Value::string(path, span))
|
||||
} else {
|
||||
let cwd = engine_state
|
||||
.cwd(Some(stack))
|
||||
.map(AbsolutePathBuf::into_std_path_buf)
|
||||
.unwrap_or_default();
|
||||
let path = expand_path_with(path, cwd, true);
|
||||
|
||||
Ok(Value::string(path.to_string_lossy(), span))
|
||||
}
|
||||
}
|
||||
|
||||
fn eval_var(
|
||||
engine_state: &EngineState,
|
||||
stack: &mut Stack,
|
||||
|
@ -1,6 +1,6 @@
|
||||
use std::{borrow::Cow, fs::File, sync::Arc};
|
||||
|
||||
use nu_path::{AbsolutePathBuf, expand_path_with};
|
||||
use nu_path::{expand_path, expand_path_with};
|
||||
use nu_protocol::{
|
||||
DataSource, DeclId, ENV_VARIABLE_ID, Flag, IntoPipelineData, IntoSpanned, ListStream, OutDest,
|
||||
PipelineData, PipelineMetadata, PositionalArg, Range, Record, RegId, ShellError, Signals,
|
||||
@ -888,9 +888,7 @@ fn literal_value(
|
||||
if *no_expand {
|
||||
Value::string(path, span)
|
||||
} else {
|
||||
let cwd = ctx.engine_state.cwd(Some(ctx.stack))?;
|
||||
let path = expand_path_with(path, cwd, true);
|
||||
|
||||
let path = expand_path(path, true);
|
||||
Value::string(path.to_string_lossy(), span)
|
||||
}
|
||||
}
|
||||
@ -904,13 +902,7 @@ fn literal_value(
|
||||
} else if *no_expand {
|
||||
Value::string(path, span)
|
||||
} else {
|
||||
let cwd = ctx
|
||||
.engine_state
|
||||
.cwd(Some(ctx.stack))
|
||||
.map(AbsolutePathBuf::into_std_path_buf)
|
||||
.unwrap_or_default();
|
||||
let path = expand_path_with(path, cwd, true);
|
||||
|
||||
let path = expand_path(path, true);
|
||||
Value::string(path.to_string_lossy(), span)
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-explore"
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
name = "nu-explore"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
|
||||
[lib]
|
||||
bench = false
|
||||
@ -14,16 +14,16 @@ bench = false
|
||||
workspace = true
|
||||
|
||||
[dependencies]
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.0" }
|
||||
nu-parser = { path = "../nu-parser", version = "0.105.0" }
|
||||
nu-path = { path = "../nu-path", version = "0.105.0" }
|
||||
nu-color-config = { path = "../nu-color-config", version = "0.105.0" }
|
||||
nu-engine = { path = "../nu-engine", version = "0.105.0" }
|
||||
nu-table = { path = "../nu-table", version = "0.105.0" }
|
||||
nu-json = { path = "../nu-json", version = "0.105.0" }
|
||||
nu-utils = { path = "../nu-utils", version = "0.105.0" }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.2" }
|
||||
nu-parser = { path = "../nu-parser", version = "0.105.2" }
|
||||
nu-path = { path = "../nu-path", version = "0.105.2" }
|
||||
nu-color-config = { path = "../nu-color-config", version = "0.105.2" }
|
||||
nu-engine = { path = "../nu-engine", version = "0.105.2" }
|
||||
nu-table = { path = "../nu-table", version = "0.105.2" }
|
||||
nu-json = { path = "../nu-json", version = "0.105.2" }
|
||||
nu-utils = { path = "../nu-utils", version = "0.105.2" }
|
||||
nu-ansi-term = { workspace = true }
|
||||
nu-pretty-hex = { path = "../nu-pretty-hex", version = "0.105.0" }
|
||||
nu-pretty-hex = { path = "../nu-pretty-hex", version = "0.105.2" }
|
||||
|
||||
anyhow = { workspace = true }
|
||||
log = { workspace = true }
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "nu-glob"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
authors = ["The Nushell Project Developers", "The Rust Project Developers"]
|
||||
license = "MIT/Apache-2.0"
|
||||
description = """
|
||||
|
@ -8,7 +8,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-json"
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
name = "nu-json"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
@ -26,8 +26,8 @@ serde = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
nu-test-support = { path = "../nu-test-support", version = "0.105.0" }
|
||||
nu-path = { path = "../nu-path", version = "0.105.0" }
|
||||
nu-test-support = { path = "../nu-test-support", version = "0.105.2" }
|
||||
nu-path = { path = "../nu-path", version = "0.105.2" }
|
||||
serde_json = "1.0"
|
||||
fancy-regex = "0.14.0"
|
||||
|
||||
|
@ -3,16 +3,16 @@ authors = ["The Nushell Project Developers"]
|
||||
description = "Nushell's integrated LSP server"
|
||||
repository = "https://github.com/nushell/nushell/tree/main/crates/nu-lsp"
|
||||
name = "nu-lsp"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
|
||||
[dependencies]
|
||||
nu-cli = { path = "../nu-cli", version = "0.105.0" }
|
||||
nu-glob = { path = "../nu-glob", version = "0.105.0" }
|
||||
nu-parser = { path = "../nu-parser", version = "0.105.0" }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.0" }
|
||||
nu-utils = { path = "../nu-utils", version = "0.105.0" }
|
||||
nu-cli = { path = "../nu-cli", version = "0.105.2" }
|
||||
nu-glob = { path = "../nu-glob", version = "0.105.2" }
|
||||
nu-parser = { path = "../nu-parser", version = "0.105.2" }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.2" }
|
||||
nu-utils = { path = "../nu-utils", version = "0.105.2" }
|
||||
|
||||
crossbeam-channel = { workspace = true }
|
||||
lsp-server = { workspace = true }
|
||||
@ -26,11 +26,11 @@ serde_json = { workspace = true }
|
||||
url = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.105.0" }
|
||||
nu-command = { path = "../nu-command", version = "0.105.0" }
|
||||
nu-engine = { path = "../nu-engine", version = "0.105.0" }
|
||||
nu-std = { path = "../nu-std", version = "0.105.0" }
|
||||
nu-test-support = { path = "../nu-test-support", version = "0.105.0" }
|
||||
nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.105.2" }
|
||||
nu-command = { path = "../nu-command", version = "0.105.2" }
|
||||
nu-engine = { path = "../nu-engine", version = "0.105.2" }
|
||||
nu-std = { path = "../nu-std", version = "0.105.2" }
|
||||
nu-test-support = { path = "../nu-test-support", version = "0.105.2" }
|
||||
|
||||
assert-json-diff = "2.0"
|
||||
|
||||
|
@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-parser"
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
name = "nu-parser"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
exclude = ["/fuzz"]
|
||||
|
||||
[lib]
|
||||
@ -15,11 +15,11 @@ bench = false
|
||||
workspace = true
|
||||
|
||||
[dependencies]
|
||||
nu-engine = { path = "../nu-engine", version = "0.105.0", default-features = false }
|
||||
nu-path = { path = "../nu-path", version = "0.105.0" }
|
||||
nu-plugin-engine = { path = "../nu-plugin-engine", optional = true, version = "0.105.0" }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.0", default-features = false }
|
||||
nu-utils = { path = "../nu-utils", version = "0.105.0", default-features = false }
|
||||
nu-engine = { path = "../nu-engine", version = "0.105.2", default-features = false }
|
||||
nu-path = { path = "../nu-path", version = "0.105.2" }
|
||||
nu-plugin-engine = { path = "../nu-plugin-engine", optional = true, version = "0.105.2" }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.2", default-features = false }
|
||||
nu-utils = { path = "../nu-utils", version = "0.105.2", default-features = false }
|
||||
|
||||
bytesize = { workspace = true }
|
||||
chrono = { default-features = false, features = ['std'], workspace = true }
|
||||
|
@ -2801,13 +2801,24 @@ pub fn parse_unit_value<'res>(
|
||||
None => number_part,
|
||||
};
|
||||
|
||||
// Convert all durations to nanoseconds to not lose precision
|
||||
let num = match unit_to_ns_factor(&unit) {
|
||||
// Convert all durations to nanoseconds, and filesizes to bytes,
|
||||
// to minimize loss of precision
|
||||
let factor = match ty {
|
||||
Type::Filesize => unit_to_byte_factor(&unit),
|
||||
Type::Duration => unit_to_ns_factor(&unit),
|
||||
_ => None,
|
||||
};
|
||||
|
||||
let num = match factor {
|
||||
Some(factor) => {
|
||||
let num_ns = num_float * factor;
|
||||
if i64::MIN as f64 <= num_ns && num_ns <= i64::MAX as f64 {
|
||||
unit = Unit::Nanosecond;
|
||||
num_ns as i64
|
||||
let num_base = num_float * factor;
|
||||
if i64::MIN as f64 <= num_base && num_base <= i64::MAX as f64 {
|
||||
unit = if ty == Type::Filesize {
|
||||
Unit::Filesize(FilesizeUnit::B)
|
||||
} else {
|
||||
Unit::Nanosecond
|
||||
};
|
||||
num_base as i64
|
||||
} else {
|
||||
// not safe to convert, because of the overflow
|
||||
num_float as i64
|
||||
@ -2934,6 +2945,27 @@ fn unit_to_ns_factor(unit: &Unit) -> Option<f64> {
|
||||
}
|
||||
}
|
||||
|
||||
fn unit_to_byte_factor(unit: &Unit) -> Option<f64> {
|
||||
match unit {
|
||||
Unit::Filesize(FilesizeUnit::B) => Some(1.0),
|
||||
Unit::Filesize(FilesizeUnit::KB) => Some(1_000.0),
|
||||
Unit::Filesize(FilesizeUnit::MB) => Some(1_000_000.0),
|
||||
Unit::Filesize(FilesizeUnit::GB) => Some(1_000_000_000.0),
|
||||
Unit::Filesize(FilesizeUnit::TB) => Some(1_000_000_000_000.0),
|
||||
Unit::Filesize(FilesizeUnit::PB) => Some(1_000_000_000_000_000.0),
|
||||
Unit::Filesize(FilesizeUnit::EB) => Some(1_000_000_000_000_000_000.0),
|
||||
Unit::Filesize(FilesizeUnit::KiB) => Some(1024.0),
|
||||
Unit::Filesize(FilesizeUnit::MiB) => Some(1024.0 * 1024.0),
|
||||
Unit::Filesize(FilesizeUnit::GiB) => Some(1024.0 * 1024.0 * 1024.0),
|
||||
Unit::Filesize(FilesizeUnit::TiB) => Some(1024.0 * 1024.0 * 1024.0 * 1024.0),
|
||||
Unit::Filesize(FilesizeUnit::PiB) => Some(1024.0 * 1024.0 * 1024.0 * 1024.0 * 1024.0),
|
||||
Unit::Filesize(FilesizeUnit::EiB) => {
|
||||
Some(1024.0 * 1024.0 * 1024.0 * 1024.0 * 1024.0 * 1024.0)
|
||||
}
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
// Borrowed from libm at https://github.com/rust-lang/libm/blob/master/src/math/modf.rs
|
||||
fn modf(x: f64) -> (f64, f64) {
|
||||
let rv2: f64;
|
||||
|
@ -1,6 +1,6 @@
|
||||
use nu_parser::*;
|
||||
use nu_protocol::{
|
||||
DeclId, ParseError, Signature, Span, SyntaxShape, Type,
|
||||
DeclId, FilesizeUnit, ParseError, Signature, Span, SyntaxShape, Type, Unit,
|
||||
ast::{Argument, Expr, Expression, ExternalArgument, PathMember, Range},
|
||||
engine::{Command, EngineState, Stack, StateWorkingSet},
|
||||
};
|
||||
@ -270,6 +270,28 @@ pub fn parse_int_with_underscores() {
|
||||
assert_eq!(element.expr.expr, Expr::Int(420692023));
|
||||
}
|
||||
|
||||
#[test]
|
||||
pub fn parse_filesize() {
|
||||
let engine_state = EngineState::new();
|
||||
let mut working_set = StateWorkingSet::new(&engine_state);
|
||||
|
||||
let block = parse(&mut working_set, None, b"95307.27MiB", true);
|
||||
|
||||
assert!(working_set.parse_errors.is_empty());
|
||||
assert_eq!(block.len(), 1);
|
||||
let pipeline = &block.pipelines[0];
|
||||
assert_eq!(pipeline.len(), 1);
|
||||
let element = &pipeline.elements[0];
|
||||
assert!(element.redirection.is_none());
|
||||
|
||||
let Expr::ValueWithUnit(value) = &element.expr.expr else {
|
||||
panic!("should be a ValueWithUnit");
|
||||
};
|
||||
|
||||
assert_eq!(value.expr.expr, Expr::Int(99_936_915_947));
|
||||
assert_eq!(value.unit.item, Unit::Filesize(FilesizeUnit::B));
|
||||
}
|
||||
|
||||
#[test]
|
||||
pub fn parse_cell_path() {
|
||||
let engine_state = EngineState::new();
|
||||
|
@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-path"
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
name = "nu-path"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
exclude = ["/fuzz"]
|
||||
|
||||
[lib]
|
||||
|
@ -60,7 +60,10 @@ where
|
||||
canonicalize(path)
|
||||
}
|
||||
|
||||
fn expand_path(path: impl AsRef<Path>, need_expand_tilde: bool) -> PathBuf {
|
||||
/// Resolve only path components (tilde, ., .., ...+), if possible.
|
||||
///
|
||||
/// Doesn't convert to absolute form or use syscalls. Output may begin with "../"
|
||||
pub fn expand_path(path: impl AsRef<Path>, need_expand_tilde: bool) -> PathBuf {
|
||||
let path = if need_expand_tilde {
|
||||
expand_tilde(path)
|
||||
} else {
|
||||
@ -77,7 +80,7 @@ fn expand_path(path: impl AsRef<Path>, need_expand_tilde: bool) -> PathBuf {
|
||||
///
|
||||
/// Furthermore, unlike canonicalize(), it does not use sys calls (such as readlink).
|
||||
///
|
||||
/// Does not convert to absolute form nor does it resolve symlinks.
|
||||
/// Converts to absolute form but does not resolve symlinks.
|
||||
/// The input path is specified relative to another path
|
||||
pub fn expand_path_with<P, Q>(path: P, relative_to: Q, expand_tilde: bool) -> PathBuf
|
||||
where
|
||||
|
@ -10,7 +10,9 @@ mod tilde;
|
||||
mod trailing_slash;
|
||||
|
||||
pub use components::components;
|
||||
pub use expansions::{canonicalize_with, expand_path_with, expand_to_real_path, locate_in_dirs};
|
||||
pub use expansions::{
|
||||
canonicalize_with, expand_path, expand_path_with, expand_to_real_path, locate_in_dirs,
|
||||
};
|
||||
pub use helpers::{cache_dir, data_dir, home_dir, nu_config_dir};
|
||||
pub use path::*;
|
||||
pub use tilde::expand_tilde;
|
||||
|
@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-plugin-core
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
name = "nu-plugin-core"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
|
||||
[lib]
|
||||
bench = false
|
||||
@ -14,8 +14,8 @@ bench = false
|
||||
workspace = true
|
||||
|
||||
[dependencies]
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.0" }
|
||||
nu-plugin-protocol = { path = "../nu-plugin-protocol", version = "0.105.0", default-features = false }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.2" }
|
||||
nu-plugin-protocol = { path = "../nu-plugin-protocol", version = "0.105.2", default-features = false }
|
||||
|
||||
rmp-serde = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
|
@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-plugin-engi
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
name = "nu-plugin-engine"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
|
||||
[lib]
|
||||
bench = false
|
||||
@ -14,12 +14,12 @@ bench = false
|
||||
workspace = true
|
||||
|
||||
[dependencies]
|
||||
nu-engine = { path = "../nu-engine", version = "0.105.0" }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.0" }
|
||||
nu-system = { path = "../nu-system", version = "0.105.0" }
|
||||
nu-plugin-protocol = { path = "../nu-plugin-protocol", version = "0.105.0" }
|
||||
nu-plugin-core = { path = "../nu-plugin-core", version = "0.105.0", default-features = false }
|
||||
nu-utils = { path = "../nu-utils", version = "0.105.0" }
|
||||
nu-engine = { path = "../nu-engine", version = "0.105.2" }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.2" }
|
||||
nu-system = { path = "../nu-system", version = "0.105.2" }
|
||||
nu-plugin-protocol = { path = "../nu-plugin-protocol", version = "0.105.2" }
|
||||
nu-plugin-core = { path = "../nu-plugin-core", version = "0.105.2", default-features = false }
|
||||
nu-utils = { path = "../nu-utils", version = "0.105.2" }
|
||||
|
||||
serde = { workspace = true }
|
||||
log = { workspace = true }
|
||||
|
@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-plugin-prot
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
name = "nu-plugin-protocol"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
|
||||
[lib]
|
||||
bench = false
|
||||
@ -14,8 +14,8 @@ bench = false
|
||||
workspace = true
|
||||
|
||||
[dependencies]
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.0", features = ["plugin"] }
|
||||
nu-utils = { path = "../nu-utils", version = "0.105.0" }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.2", features = ["plugin"] }
|
||||
nu-utils = { path = "../nu-utils", version = "0.105.2" }
|
||||
|
||||
rmp-serde = { workspace = true }
|
||||
serde = { workspace = true, features = ["derive"] }
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "nu-plugin-test-support"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
description = "Testing support for Nushell plugins"
|
||||
@ -15,14 +15,14 @@ workspace = true
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
nu-engine = { path = "../nu-engine", version = "0.105.0", features = ["plugin"] }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.0", features = ["plugin"] }
|
||||
nu-parser = { path = "../nu-parser", version = "0.105.0", features = ["plugin"] }
|
||||
nu-plugin = { path = "../nu-plugin", version = "0.105.0" }
|
||||
nu-plugin-core = { path = "../nu-plugin-core", version = "0.105.0" }
|
||||
nu-plugin-engine = { path = "../nu-plugin-engine", version = "0.105.0" }
|
||||
nu-plugin-protocol = { path = "../nu-plugin-protocol", version = "0.105.0" }
|
||||
nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.105.0" }
|
||||
nu-engine = { path = "../nu-engine", version = "0.105.2", features = ["plugin"] }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.2", features = ["plugin"] }
|
||||
nu-parser = { path = "../nu-parser", version = "0.105.2", features = ["plugin"] }
|
||||
nu-plugin = { path = "../nu-plugin", version = "0.105.2" }
|
||||
nu-plugin-core = { path = "../nu-plugin-core", version = "0.105.2" }
|
||||
nu-plugin-engine = { path = "../nu-plugin-engine", version = "0.105.2" }
|
||||
nu-plugin-protocol = { path = "../nu-plugin-protocol", version = "0.105.2" }
|
||||
nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.105.2" }
|
||||
nu-ansi-term = { workspace = true }
|
||||
similar = "2.7"
|
||||
|
||||
|
@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-plugin"
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
name = "nu-plugin"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
|
||||
[lib]
|
||||
bench = false
|
||||
@ -14,11 +14,11 @@ bench = false
|
||||
workspace = true
|
||||
|
||||
[dependencies]
|
||||
nu-engine = { path = "../nu-engine", version = "0.105.0", features = ["plugin"] }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.0", features = ["plugin"] }
|
||||
nu-plugin-protocol = { path = "../nu-plugin-protocol", version = "0.105.0" }
|
||||
nu-plugin-core = { path = "../nu-plugin-core", version = "0.105.0", default-features = false }
|
||||
nu-utils = { path = "../nu-utils", version = "0.105.0" }
|
||||
nu-engine = { path = "../nu-engine", version = "0.105.2", features = ["plugin"] }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.2", features = ["plugin"] }
|
||||
nu-plugin-protocol = { path = "../nu-plugin-protocol", version = "0.105.2" }
|
||||
nu-plugin-core = { path = "../nu-plugin-core", version = "0.105.2", default-features = false }
|
||||
nu-utils = { path = "../nu-utils", version = "0.105.2" }
|
||||
|
||||
log = { workspace = true }
|
||||
thiserror = "2.0.12"
|
||||
|
@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-pretty-hex"
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
name = "nu-pretty-hex"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
|
@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-protocol"
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
name = "nu-protocol"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
@ -16,11 +16,11 @@ bench = false
|
||||
workspace = true
|
||||
|
||||
[dependencies]
|
||||
nu-utils = { path = "../nu-utils", version = "0.105.0", default-features = false }
|
||||
nu-glob = { path = "../nu-glob", version = "0.105.0" }
|
||||
nu-path = { path = "../nu-path", version = "0.105.0" }
|
||||
nu-system = { path = "../nu-system", version = "0.105.0" }
|
||||
nu-derive-value = { path = "../nu-derive-value", version = "0.105.0" }
|
||||
nu-utils = { path = "../nu-utils", version = "0.105.2", default-features = false }
|
||||
nu-glob = { path = "../nu-glob", version = "0.105.2" }
|
||||
nu-path = { path = "../nu-path", version = "0.105.2" }
|
||||
nu-system = { path = "../nu-system", version = "0.105.2" }
|
||||
nu-derive-value = { path = "../nu-derive-value", version = "0.105.2" }
|
||||
|
||||
brotli = { workspace = true, optional = true }
|
||||
bytes = { workspace = true }
|
||||
@ -68,8 +68,8 @@ plugin = [
|
||||
|
||||
[dev-dependencies]
|
||||
serde_json = { workspace = true }
|
||||
nu-test-support = { path = "../nu-test-support", version = "0.105.0" }
|
||||
nu-utils = { path = "../nu-utils", version = "0.105.0" }
|
||||
nu-test-support = { path = "../nu-test-support", version = "0.105.2" }
|
||||
nu-utils = { path = "../nu-utils", version = "0.105.2" }
|
||||
pretty_assertions = { workspace = true }
|
||||
rstest = { workspace = true }
|
||||
tempfile = { workspace = true }
|
||||
|
@ -128,7 +128,8 @@ impl Call {
|
||||
|
||||
pub fn named_iter(
|
||||
&self,
|
||||
) -> impl Iterator<Item = &(Spanned<String>, Option<Spanned<String>>, Option<Expression>)> {
|
||||
) -> impl DoubleEndedIterator<Item = &(Spanned<String>, Option<Spanned<String>>, Option<Expression>)>
|
||||
{
|
||||
self.arguments.iter().filter_map(|arg| match arg {
|
||||
Argument::Named(named) => Some(named),
|
||||
Argument::Positional(_) => None,
|
||||
@ -222,7 +223,7 @@ impl Call {
|
||||
}
|
||||
|
||||
pub fn get_flag_expr(&self, flag_name: &str) -> Option<&Expression> {
|
||||
for name in self.named_iter() {
|
||||
for name in self.named_iter().rev() {
|
||||
if flag_name == name.0.item {
|
||||
return name.2.as_ref();
|
||||
}
|
||||
@ -232,7 +233,7 @@ impl Call {
|
||||
}
|
||||
|
||||
pub fn get_named_arg(&self, flag_name: &str) -> Option<Spanned<String>> {
|
||||
for name in self.named_iter() {
|
||||
for name in self.named_iter().rev() {
|
||||
if flag_name == name.0.item {
|
||||
return Some(name.0.clone());
|
||||
}
|
||||
|
@ -414,6 +414,37 @@ impl Stack {
|
||||
result
|
||||
}
|
||||
|
||||
/// Get hidden envs, but without envs defined previously in `excluded_overlay_name`.
|
||||
pub fn get_hidden_env_vars(
|
||||
&self,
|
||||
excluded_overlay_name: &str,
|
||||
engine_state: &EngineState,
|
||||
) -> HashMap<String, Value> {
|
||||
let mut result = HashMap::new();
|
||||
|
||||
for overlay_name in self.active_overlays.iter().rev() {
|
||||
if overlay_name == excluded_overlay_name {
|
||||
continue;
|
||||
}
|
||||
if let Some(env_names) = self.env_hidden.get(overlay_name) {
|
||||
for n in env_names {
|
||||
if result.contains_key(n) {
|
||||
continue;
|
||||
}
|
||||
// get env value.
|
||||
if let Some(Some(v)) = engine_state
|
||||
.env_vars
|
||||
.get(overlay_name)
|
||||
.map(|env_vars| env_vars.get(n))
|
||||
{
|
||||
result.insert(n.to_string(), v.clone());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
result
|
||||
}
|
||||
|
||||
/// Same as get_env_vars, but returns only the names as a HashSet
|
||||
pub fn get_env_var_names(&self, engine_state: &EngineState) -> HashSet<String> {
|
||||
let mut result = HashSet::new();
|
||||
|
@ -1,4 +1,6 @@
|
||||
//! Foundational [`Eval`] trait allowing dispatch between const-eval and regular evaluation
|
||||
use nu_path::expand_path;
|
||||
|
||||
use crate::{
|
||||
BlockId, Config, ENV_VARIABLE_ID, GetSpan, Range, Record, ShellError, Span, Value, VarId,
|
||||
ast::{
|
||||
@ -32,9 +34,23 @@ pub trait Eval {
|
||||
Expr::Int(i) => Ok(Value::int(*i, expr_span)),
|
||||
Expr::Float(f) => Ok(Value::float(*f, expr_span)),
|
||||
Expr::Binary(b) => Ok(Value::binary(b.clone(), expr_span)),
|
||||
Expr::Filepath(path, quoted) => Self::eval_filepath(state, mut_state, path.clone(), *quoted, expr_span),
|
||||
Expr::Filepath(path, quoted) => {
|
||||
if *quoted {
|
||||
Ok(Value::string(path, expr_span))
|
||||
} else {
|
||||
let path = expand_path(path, true);
|
||||
Ok(Value::string(path.to_string_lossy(), expr_span))
|
||||
}
|
||||
}
|
||||
Expr::Directory(path, quoted) => {
|
||||
Self::eval_directory(state, mut_state, path.clone(), *quoted, expr_span)
|
||||
if path == "-" {
|
||||
Ok(Value::string("-", expr_span))
|
||||
} else if *quoted {
|
||||
Ok(Value::string(path, expr_span))
|
||||
} else {
|
||||
let path = expand_path(path, true);
|
||||
Ok(Value::string(path.to_string_lossy(), expr_span))
|
||||
}
|
||||
}
|
||||
Expr::Var(var_id) => Self::eval_var(state, mut_state, *var_id, expr_span),
|
||||
Expr::CellPath(cell_path) => Ok(Value::cell_path(cell_path.clone(), expr_span)),
|
||||
@ -329,22 +345,6 @@ pub trait Eval {
|
||||
|
||||
fn get_config(state: Self::State<'_>, mut_state: &mut Self::MutState) -> Arc<Config>;
|
||||
|
||||
fn eval_filepath(
|
||||
state: Self::State<'_>,
|
||||
mut_state: &mut Self::MutState,
|
||||
path: String,
|
||||
quoted: bool,
|
||||
span: Span,
|
||||
) -> Result<Value, ShellError>;
|
||||
|
||||
fn eval_directory(
|
||||
state: Self::State<'_>,
|
||||
mut_state: &mut Self::MutState,
|
||||
path: String,
|
||||
quoted: bool,
|
||||
span: Span,
|
||||
) -> Result<Value, ShellError>;
|
||||
|
||||
fn eval_var(
|
||||
state: Self::State<'_>,
|
||||
mut_state: &mut Self::MutState,
|
||||
|
@ -441,26 +441,6 @@ impl Eval for EvalConst {
|
||||
state.get_config().clone()
|
||||
}
|
||||
|
||||
fn eval_filepath(
|
||||
_: &StateWorkingSet,
|
||||
_: &mut (),
|
||||
path: String,
|
||||
_: bool,
|
||||
span: Span,
|
||||
) -> Result<Value, ShellError> {
|
||||
Ok(Value::string(path, span))
|
||||
}
|
||||
|
||||
fn eval_directory(
|
||||
_: &StateWorkingSet,
|
||||
_: &mut (),
|
||||
_: String,
|
||||
_: bool,
|
||||
span: Span,
|
||||
) -> Result<Value, ShellError> {
|
||||
Err(ShellError::NotAConstant { span })
|
||||
}
|
||||
|
||||
fn eval_var(
|
||||
working_set: &StateWorkingSet,
|
||||
_: &mut (),
|
||||
|
@ -7,7 +7,7 @@ use crate::{ShellError, Span, Type, Value, ast::Operator};
|
||||
pub trait CustomValue: fmt::Debug + Send + Sync {
|
||||
/// Custom `Clone` implementation
|
||||
///
|
||||
/// This can reemit a `Value::CustomValue(Self, span)` or materialize another representation
|
||||
/// This can reemit a `Value::Custom(Self, span)` or materialize another representation
|
||||
/// if necessary.
|
||||
fn clone_value(&self, span: Span) -> Value;
|
||||
|
||||
|
@ -1981,7 +1981,7 @@ impl Value {
|
||||
/// as it will point into unknown source when used in errors.
|
||||
///
|
||||
/// Returns a `Vec` containing one of each value case (`Value::Int`, `Value::String`, etc.)
|
||||
/// except for `Value::CustomValue`.
|
||||
/// except for `Value::Custom`.
|
||||
pub fn test_values() -> Vec<Value> {
|
||||
vec![
|
||||
Value::test_bool(false),
|
||||
|
@ -5,12 +5,12 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-std"
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
name = "nu-std"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
|
||||
[dependencies]
|
||||
nu-parser = { version = "0.105.0", path = "../nu-parser" }
|
||||
nu-protocol = { version = "0.105.0", path = "../nu-protocol", default-features = false }
|
||||
nu-engine = { version = "0.105.0", path = "../nu-engine", default-features = false }
|
||||
nu-parser = { version = "0.105.2", path = "../nu-parser" }
|
||||
nu-protocol = { version = "0.105.2", path = "../nu-protocol", default-features = false }
|
||||
nu-engine = { version = "0.105.2", path = "../nu-engine", default-features = false }
|
||||
miette = { workspace = true, features = ["fancy-no-backtrace"] }
|
||||
|
||||
log = "0.4"
|
||||
|
@ -64,6 +64,7 @@ pub fn load_standard_library(
|
||||
"std/testing",
|
||||
include_str!("../std/testing/mod.nu"),
|
||||
),
|
||||
("mod.nu", "std/clip", include_str!("../std/clip/mod.nu")),
|
||||
];
|
||||
|
||||
for (filename, std_subdir_name, content) in std_submodules.drain(..) {
|
||||
|
@ -1,48 +1,38 @@
|
||||
# The clip module has been added to std. This std-rfc module is deprecated and will be removed.
|
||||
#
|
||||
# Commands for interacting with the system clipboard
|
||||
#
|
||||
# > These commands require your terminal to support OSC 52
|
||||
# > Terminal multiplexers such as screen, tmux, zellij etc may interfere with this command
|
||||
|
||||
module std-clip {
|
||||
export use std/clip *
|
||||
}
|
||||
|
||||
use std-clip
|
||||
|
||||
# Copy input to system clipboard
|
||||
@deprecated "The clip module has been moved to std. Please use the std version instead of the std-rfc version." --since 0.105.0 --remove 0.107.0
|
||||
@example "Copy a string to the clipboard" {
|
||||
"Hello" | clip copy
|
||||
}
|
||||
export def copy [
|
||||
--ansi (-a) # Copy ansi formatting
|
||||
]: any -> nothing {
|
||||
let input = $in | collect
|
||||
if not $ansi {
|
||||
$env.config.use_ansi_coloring = false
|
||||
}
|
||||
let text = match ($input | describe -d | get type) {
|
||||
$type if $type in [ table, record, list ] => {
|
||||
$input | table -e
|
||||
}
|
||||
_ => {$input}
|
||||
}
|
||||
|
||||
print -n $'(ansi osc)52;c;($text | encode base64)(ansi st)'
|
||||
std-clip copy --ansi=$ansi
|
||||
}
|
||||
|
||||
# Paste contents of system clipboard
|
||||
@deprecated "The clip module has been moved to std. Please use the std version instead of the std-rfc version." --since 0.105.0 --remove 0.107.0
|
||||
@example "Paste a string from the clipboard" {
|
||||
clip paste
|
||||
} --result "Hello"
|
||||
export def paste []: [nothing -> string] {
|
||||
try {
|
||||
term query $'(ansi osc)52;c;?(ansi st)' -p $'(ansi osc)52;c;' -t (ansi st)
|
||||
} catch {
|
||||
error make -u {
|
||||
msg: "Terminal did not responds to OSC 52 paste request."
|
||||
help: $"Check if your terminal supports OSC 52."
|
||||
}
|
||||
}
|
||||
| decode
|
||||
| decode base64
|
||||
| decode
|
||||
std-clip paste
|
||||
}
|
||||
|
||||
# Add a prefix to each line of the content to be copied
|
||||
@deprecated "The clip module has been moved to std. Please use the std version instead of the std-rfc version." --since 0.105.0 --remove 0.107.0
|
||||
@example "Format output for Nushell doc" {
|
||||
[1 2 3] | clip prefix '# => '
|
||||
} --result "# => ╭───┬───╮
|
||||
@ -55,12 +45,5 @@ export def paste []: [nothing -> string] {
|
||||
ls | clip prefix '# => ' | clip copy
|
||||
}
|
||||
export def prefix [prefix: string]: any -> string {
|
||||
let input = $in | collect
|
||||
match ($input | describe -d | get type) {
|
||||
$type if $type in [ table, record, list ] => {
|
||||
$input | table -e
|
||||
}
|
||||
_ => {$input}
|
||||
}
|
||||
| str replace -r --all '(?m)(.*)' $'($prefix)$1'
|
||||
std-clip prefix $prefix
|
||||
}
|
||||
|
66
crates/nu-std/std/clip/mod.nu
Normal file
66
crates/nu-std/std/clip/mod.nu
Normal file
@ -0,0 +1,66 @@
|
||||
# Commands for interacting with the system clipboard
|
||||
#
|
||||
# > These commands require your terminal to support OSC 52
|
||||
# > Terminal multiplexers such as screen, tmux, zellij etc may interfere with this command
|
||||
|
||||
# Copy input to system clipboard
|
||||
@example "Copy a string to the clipboard" {
|
||||
"Hello" | clip copy
|
||||
}
|
||||
export def copy [
|
||||
--ansi (-a) # Copy ansi formatting
|
||||
]: any -> nothing {
|
||||
let input = $in | collect
|
||||
if not $ansi {
|
||||
$env.config.use_ansi_coloring = false
|
||||
}
|
||||
let text = match ($input | describe -d | get type) {
|
||||
$type if $type in [ table, record, list ] => {
|
||||
$input | table -e
|
||||
}
|
||||
_ => {$input}
|
||||
}
|
||||
|
||||
print -n $'(ansi osc)52;c;($text | encode base64)(ansi st)'
|
||||
}
|
||||
|
||||
# Paste contents of system clipboard
|
||||
@example "Paste a string from the clipboard" {
|
||||
clip paste
|
||||
} --result "Hello"
|
||||
export def paste []: [nothing -> string] {
|
||||
try {
|
||||
term query $'(ansi osc)52;c;?(ansi st)' -p $'(ansi osc)52;c;' -t (ansi st)
|
||||
} catch {
|
||||
error make -u {
|
||||
msg: "Terminal did not responds to OSC 52 paste request."
|
||||
help: $"Check if your terminal supports OSC 52."
|
||||
}
|
||||
}
|
||||
| decode
|
||||
| decode base64
|
||||
| decode
|
||||
}
|
||||
|
||||
# Add a prefix to each line of the content to be copied
|
||||
@example "Format output for Nushell doc" {
|
||||
[1 2 3] | clip prefix '# => '
|
||||
} --result "# => ╭───┬───╮
|
||||
# => │ 0 │ 1 │
|
||||
# => │ 1 │ 2 │
|
||||
# => │ 2 │ 3 │
|
||||
# => ╰───┴───╯
|
||||
# => "
|
||||
@example "Format output for Nushell doc and copy it" {
|
||||
ls | clip prefix '# => ' | clip copy
|
||||
}
|
||||
export def prefix [prefix: string]: any -> string {
|
||||
let input = $in | collect
|
||||
match ($input | describe -d | get type) {
|
||||
$type if $type in [ table, record, list ] => {
|
||||
$input | table -e
|
||||
}
|
||||
_ => {$input}
|
||||
}
|
||||
| str replace -r --all '(?m)(.*)' $'($prefix)$1'
|
||||
}
|
@ -37,11 +37,16 @@ def get-annotated [
|
||||
source `($file)`
|
||||
scope commands
|
||||
| select name attributes
|
||||
| where attributes != []
|
||||
| to nuon
|
||||
'
|
||||
| from nuon
|
||||
| update attributes { get name | each {|x| $valid_annotations | get -i $x } | first }
|
||||
| each {|e|
|
||||
# filter commands with test attributes, and map attributes to annotation name
|
||||
let test_attributes = $e.attributes.name | each {|x| $valid_annotations | get -i $x }
|
||||
if ($test_attributes | is-not-empty) {
|
||||
$e | update attributes $test_attributes.0
|
||||
}
|
||||
}
|
||||
| rename function_name annotation
|
||||
}
|
||||
|
||||
|
@ -3,7 +3,7 @@ authors = ["The Nushell Project Developers", "procs creators"]
|
||||
description = "Nushell system querying"
|
||||
repository = "https://github.com/nushell/nushell/tree/main/crates/nu-system"
|
||||
name = "nu-system"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
|
||||
|
@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-table"
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
name = "nu-table"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
|
||||
[lib]
|
||||
bench = false
|
||||
@ -14,13 +14,13 @@ bench = false
|
||||
workspace = true
|
||||
|
||||
[dependencies]
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.0", default-features = false }
|
||||
nu-utils = { path = "../nu-utils", version = "0.105.0", default-features = false }
|
||||
nu-engine = { path = "../nu-engine", version = "0.105.0", default-features = false }
|
||||
nu-color-config = { path = "../nu-color-config", version = "0.105.0" }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.2", default-features = false }
|
||||
nu-utils = { path = "../nu-utils", version = "0.105.2", default-features = false }
|
||||
nu-engine = { path = "../nu-engine", version = "0.105.2", default-features = false }
|
||||
nu-color-config = { path = "../nu-color-config", version = "0.105.2" }
|
||||
nu-ansi-term = { workspace = true }
|
||||
fancy-regex = { workspace = true }
|
||||
tabled = { workspace = true, features = ["ansi"], default-features = false }
|
||||
|
||||
[dev-dependencies]
|
||||
# nu-test-support = { path="../nu-test-support", version = "0.105.0" }
|
||||
# nu-test-support = { path="../nu-test-support", version = "0.105.2" }
|
||||
|
@ -92,6 +92,16 @@ impl NuTable {
|
||||
self.count_cols
|
||||
}
|
||||
|
||||
pub fn create(text: String) -> NuRecordsValue {
|
||||
Text::new(text)
|
||||
}
|
||||
|
||||
pub fn insert_value(&mut self, pos: (usize, usize), value: NuRecordsValue) {
|
||||
let width = value.width() + indent_sum(self.config.indent);
|
||||
self.widths[pos.1] = max(self.widths[pos.1], width);
|
||||
self.data[pos.0][pos.1] = value;
|
||||
}
|
||||
|
||||
pub fn insert(&mut self, pos: (usize, usize), text: String) {
|
||||
let text = Text::new(text);
|
||||
let width = text.width() + indent_sum(self.config.indent);
|
||||
@ -475,7 +485,8 @@ fn draw_table(
|
||||
truncate_table(&mut table, &t.config, width, termwidth);
|
||||
table_set_border_header(&mut table, head, &t.config);
|
||||
|
||||
table_to_string(table, termwidth)
|
||||
let string = table.to_string();
|
||||
Some(string)
|
||||
}
|
||||
|
||||
fn set_styles(table: &mut Table, styles: Styles, structure: &TableStructure) {
|
||||
@ -531,18 +542,6 @@ fn set_indent(table: &mut Table, indent: TableIndent) {
|
||||
table.with(Padding::new(indent.left, indent.right, 0, 0));
|
||||
}
|
||||
|
||||
fn table_to_string(table: Table, termwidth: usize) -> Option<String> {
|
||||
// Note: this is a "safe" path; presumable it must never happen cause we must made all the checks already
|
||||
// TODO: maybe remove it? I think so?
|
||||
let total_width = table.total_width();
|
||||
if total_width > termwidth {
|
||||
None
|
||||
} else {
|
||||
let content = table.to_string();
|
||||
Some(content)
|
||||
}
|
||||
}
|
||||
|
||||
struct WidthCtrl {
|
||||
width: WidthEstimation,
|
||||
trim_strategy: TrimStrategy,
|
||||
@ -915,7 +914,9 @@ fn truncate_columns_by_content(
|
||||
widths.push(trailing_column_width);
|
||||
width += trailing_column_width;
|
||||
|
||||
if widths.len() == 1 {
|
||||
let has_only_trail = widths.len() == 1;
|
||||
let is_enough_space = width <= termwidth;
|
||||
if has_only_trail || !is_enough_space {
|
||||
// nothing to show anyhow
|
||||
return WidthEstimation::new(widths_original, vec![], width, false, true);
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ use std::cmp::max;
|
||||
use nu_color_config::{Alignment, StyleComputer, TextStyle};
|
||||
use nu_engine::column::get_columns;
|
||||
use nu_protocol::{Config, Record, ShellError, Span, Value};
|
||||
use tabled::grid::records::vec_records::Cell;
|
||||
|
||||
use crate::{
|
||||
NuTable, TableOpts, TableOutput,
|
||||
@ -186,13 +187,14 @@ fn expand_list(input: &[Value], cfg: Cfg<'_>) -> TableResult {
|
||||
.and_then(|val| val.get(INDEX_COLUMN_NAME))
|
||||
.map(|value| value.to_expanded_string("", cfg.opts.config))
|
||||
.unwrap_or_else(|| index.to_string());
|
||||
let index_width = string_width(&index_value);
|
||||
let index_value = NuTable::create(index_value);
|
||||
let index_width = index_value.width();
|
||||
if available_width <= index_width + extra_width + pad_width {
|
||||
// NOTE: we don't wanna wrap index; so we return
|
||||
return Ok(None);
|
||||
}
|
||||
|
||||
table.insert((row, 0), index_value);
|
||||
table.insert_value((row, 0), index_value);
|
||||
|
||||
index_column_width = max(index_column_width, index_width);
|
||||
}
|
||||
@ -241,9 +243,10 @@ fn expand_list(input: &[Value], cfg: Cfg<'_>) -> TableResult {
|
||||
.and_then(|val| val.get(INDEX_COLUMN_NAME))
|
||||
.map(|value| value.to_expanded_string("", cfg.opts.config))
|
||||
.unwrap_or_else(|| index.to_string());
|
||||
let index_width = string_width(&index_value);
|
||||
let index_value = NuTable::create(index_value);
|
||||
let index_width = index_value.width();
|
||||
|
||||
table.insert((row + 1, 0), index_value);
|
||||
table.insert_value((row + 1, 0), index_value);
|
||||
index_column_width = max(index_column_width, index_width);
|
||||
}
|
||||
|
||||
@ -294,11 +297,13 @@ fn expand_list(input: &[Value], cfg: Cfg<'_>) -> TableResult {
|
||||
|
||||
let inner_cfg = cfg_expand_reset_table(cfg.clone(), available);
|
||||
let cell = expand_entry_with_header(item, &header, inner_cfg);
|
||||
let value_width = string_width(&cell.text); // TODO: optimize cause when we expand we alrready know the width (most of the time or all)
|
||||
// TODO: optimize cause when we expand we alrready know the width (most of the time or all)
|
||||
let value = NuTable::create(cell.text);
|
||||
let value_width = value.width();
|
||||
|
||||
column_width = max(column_width, value_width);
|
||||
|
||||
table.insert((row + 1, column), cell.text);
|
||||
table.insert_value((row + 1, column), value);
|
||||
table.insert_style((row + 1, column), cell.style);
|
||||
|
||||
total_column_rows = total_column_rows.saturating_add(cell.size);
|
||||
|
@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-term-grid"
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
name = "nu-term-grid"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
|
||||
[lib]
|
||||
bench = false
|
||||
@ -14,6 +14,6 @@ bench = false
|
||||
workspace = true
|
||||
|
||||
[dependencies]
|
||||
nu-utils = { path = "../nu-utils", version = "0.105.0", default-features = false }
|
||||
nu-utils = { path = "../nu-utils", version = "0.105.2", default-features = false }
|
||||
|
||||
unicode-width = { workspace = true }
|
||||
|
@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-test-suppor
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
name = "nu-test-support"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
@ -15,9 +15,9 @@ bench = false
|
||||
workspace = true
|
||||
|
||||
[dependencies]
|
||||
nu-path = { path = "../nu-path", version = "0.105.0" }
|
||||
nu-glob = { path = "../nu-glob", version = "0.105.0" }
|
||||
nu-utils = { path = "../nu-utils", version = "0.105.0" }
|
||||
nu-path = { path = "../nu-path", version = "0.105.2" }
|
||||
nu-glob = { path = "../nu-glob", version = "0.105.2" }
|
||||
nu-utils = { path = "../nu-utils", version = "0.105.2" }
|
||||
|
||||
num-format = { workspace = true }
|
||||
which = { workspace = true }
|
||||
|
@ -5,7 +5,7 @@ edition = "2024"
|
||||
license = "MIT"
|
||||
name = "nu-utils"
|
||||
repository = "https://github.com/nushell/nushell/tree/main/crates/nu-utils"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
[[bin]]
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Nushell Config File
|
||||
#
|
||||
# version = "0.105.0"
|
||||
# version = "0.105.2"
|
||||
$env.config.color_config = {
|
||||
separator: white
|
||||
leading_trailing_space_bg: { attr: n }
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Default Nushell Environment Config File
|
||||
# These "sensible defaults" are set before the user's `env.nu` is loaded
|
||||
#
|
||||
# version = "0.105.0"
|
||||
# version = "0.105.2"
|
||||
|
||||
$env.PROMPT_COMMAND = {||
|
||||
let dir = match (do -i { $env.PWD | path relative-to $nu.home-path }) {
|
||||
|
@ -3,7 +3,7 @@
|
||||
# Warning: This file is intended for documentation purposes only and
|
||||
# is not intended to be used as an actual configuration file as-is.
|
||||
#
|
||||
# version = "0.105.0"
|
||||
# version = "0.105.2"
|
||||
#
|
||||
# A `config.nu` file is used to override default Nushell settings,
|
||||
# define (or import) custom commands, or run any other startup tasks.
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Nushell Environment Config File Documentation
|
||||
#
|
||||
# version = "0.105.0"
|
||||
# version = "0.105.2"
|
||||
#
|
||||
# Previously, environment variables were typically configured in `env.nu`.
|
||||
# In general, most configuration can and should be performed in `config.nu`
|
||||
|
@ -1,7 +1,7 @@
|
||||
# config.nu
|
||||
#
|
||||
# Installed by:
|
||||
# version = "0.105.0"
|
||||
# version = "0.105.2"
|
||||
#
|
||||
# This file is used to override default Nushell settings, define
|
||||
# (or import) custom commands, or run any other startup tasks.
|
||||
|
@ -1,7 +1,7 @@
|
||||
# env.nu
|
||||
#
|
||||
# Installed by:
|
||||
# version = "0.105.0"
|
||||
# version = "0.105.2"
|
||||
#
|
||||
# Previously, environment variables were typically configured in `env.nu`.
|
||||
# In general, most configuration can and should be performed in `config.nu`
|
||||
|
@ -10,10 +10,10 @@ name = "nu_plugin_custom_values"
|
||||
bench = false
|
||||
|
||||
[dependencies]
|
||||
nu-plugin = { path = "../nu-plugin", version = "0.105.0", features = [] }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.0", features = ["plugin"] }
|
||||
nu-plugin = { path = "../nu-plugin", version = "0.105.2", features = [] }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.2", features = ["plugin"] }
|
||||
serde = { workspace = true }
|
||||
typetag = "0.2"
|
||||
|
||||
[dev-dependencies]
|
||||
nu-plugin-test-support = { path = "../nu-plugin-test-support", version = "0.105.0" }
|
||||
nu-plugin-test-support = { path = "../nu-plugin-test-support", version = "0.105.2" }
|
||||
|
@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu_plugin_exam
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
name = "nu_plugin_example"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
|
||||
[[bin]]
|
||||
name = "nu_plugin_example"
|
||||
@ -15,9 +15,9 @@ bench = false
|
||||
bench = false
|
||||
|
||||
[dependencies]
|
||||
nu-plugin = { path = "../nu-plugin", version = "0.105.0" }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.0", features = ["plugin"] }
|
||||
nu-plugin = { path = "../nu-plugin", version = "0.105.2" }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.2", features = ["plugin"] }
|
||||
|
||||
[dev-dependencies]
|
||||
nu-plugin-test-support = { path = "../nu-plugin-test-support", version = "0.105.0" }
|
||||
nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.105.0" }
|
||||
nu-plugin-test-support = { path = "../nu-plugin-test-support", version = "0.105.2" }
|
||||
nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.105.2" }
|
||||
|
@ -5,12 +5,12 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu_plugin_form
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
name = "nu_plugin_formats"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
nu-plugin = { path = "../nu-plugin", version = "0.105.0" }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.0", features = ["plugin"] }
|
||||
nu-plugin = { path = "../nu-plugin", version = "0.105.2" }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.2", features = ["plugin"] }
|
||||
|
||||
indexmap = { workspace = true }
|
||||
eml-parser = "0.1"
|
||||
@ -20,4 +20,4 @@ plist = "1.7"
|
||||
chrono = "0.4"
|
||||
|
||||
[dev-dependencies]
|
||||
nu-plugin-test-support = { path = "../nu-plugin-test-support", version = "0.105.0" }
|
||||
nu-plugin-test-support = { path = "../nu-plugin-test-support", version = "0.105.2" }
|
||||
|
@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu_plugin_gsta
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
name = "nu_plugin_gstat"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
@ -16,7 +16,7 @@ name = "nu_plugin_gstat"
|
||||
bench = false
|
||||
|
||||
[dependencies]
|
||||
nu-plugin = { path = "../nu-plugin", version = "0.105.0" }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.0" }
|
||||
nu-plugin = { path = "../nu-plugin", version = "0.105.2" }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.2" }
|
||||
|
||||
git2 = "0.20"
|
||||
|
@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu_plugin_inc"
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
name = "nu_plugin_inc"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
@ -16,7 +16,7 @@ name = "nu_plugin_inc"
|
||||
bench = false
|
||||
|
||||
[dependencies]
|
||||
nu-plugin = { path = "../nu-plugin", version = "0.105.0" }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.0", features = ["plugin"] }
|
||||
nu-plugin = { path = "../nu-plugin", version = "0.105.2" }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.2", features = ["plugin"] }
|
||||
|
||||
semver = "1.0"
|
||||
|
@ -6,7 +6,7 @@
|
||||
# it also allows us to test the plugin interface with something manually implemented in a scripting
|
||||
# language without adding any extra dependencies to our tests.
|
||||
|
||||
const NUSHELL_VERSION = "0.105.0"
|
||||
const NUSHELL_VERSION = "0.105.2"
|
||||
const PLUGIN_VERSION = "0.1.1" # bump if you change commands!
|
||||
|
||||
def main [--stdio] {
|
||||
|
@ -5,7 +5,7 @@ edition = "2024"
|
||||
license = "MIT"
|
||||
name = "nu_plugin_polars"
|
||||
repository = "https://github.com/nushell/nushell/tree/main/crates/nu_plugin_polars"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
@ -17,10 +17,10 @@ bench = false
|
||||
bench = false
|
||||
|
||||
[dependencies]
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.0" }
|
||||
nu-plugin = { path = "../nu-plugin", version = "0.105.0" }
|
||||
nu-path = { path = "../nu-path", version = "0.105.0" }
|
||||
nu-utils = { path = "../nu-utils", version = "0.105.0" }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.2" }
|
||||
nu-plugin = { path = "../nu-plugin", version = "0.105.2" }
|
||||
nu-path = { path = "../nu-path", version = "0.105.2" }
|
||||
nu-utils = { path = "../nu-utils", version = "0.105.2" }
|
||||
|
||||
# Potential dependencies for extras
|
||||
chrono = { workspace = true, features = [
|
||||
@ -103,9 +103,9 @@ optional = false
|
||||
version = "0.48"
|
||||
|
||||
[dev-dependencies]
|
||||
nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.105.0" }
|
||||
nu-engine = { path = "../nu-engine", version = "0.105.0" }
|
||||
nu-parser = { path = "../nu-parser", version = "0.105.0" }
|
||||
nu-command = { path = "../nu-command", version = "0.105.0" }
|
||||
nu-plugin-test-support = { path = "../nu-plugin-test-support", version = "0.105.0" }
|
||||
nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.105.2" }
|
||||
nu-engine = { path = "../nu-engine", version = "0.105.2" }
|
||||
nu-parser = { path = "../nu-parser", version = "0.105.2" }
|
||||
nu-command = { path = "../nu-command", version = "0.105.2" }
|
||||
nu-plugin-test-support = { path = "../nu-plugin-test-support", version = "0.105.2" }
|
||||
tempfile.workspace = true
|
||||
|
@ -1,14 +1,17 @@
|
||||
use crate::{
|
||||
PolarsPlugin,
|
||||
values::{Column, CustomValueSupport, NuLazyFrame, PolarsPluginObject},
|
||||
values::{Column, CustomValueSupport, NuLazyFrame, NuLazyGroupBy, PolarsPluginObject},
|
||||
};
|
||||
|
||||
use crate::values::{NuDataFrame, NuExpression, utils::DEFAULT_ROWS};
|
||||
use crate::values::{NuDataFrame, NuExpression};
|
||||
use nu_plugin::{EngineInterface, EvaluatedCall, PluginCommand};
|
||||
use nu_protocol::{
|
||||
Category, Example, LabeledError, PipelineData, ShellError, Signature, Span, SyntaxShape, Type,
|
||||
Value,
|
||||
};
|
||||
use polars::df;
|
||||
|
||||
const DEFAULT_ROWS: usize = 1;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct LastDF;
|
||||
@ -62,6 +65,24 @@ impl PluginCommand for LastDF {
|
||||
example: "polars col a | polars last",
|
||||
result: None,
|
||||
},
|
||||
Example {
|
||||
description: "Aggregate the last values in the group.",
|
||||
example: "[[a b c d]; [1 0.5 true Apple] [2 0.5 true Orange] [2 4 true Apple] [3 10 false Apple] [4 13 false Banana] [5 14 true Banana]] | polars into-df -s {a: u8, b: f32, c: bool, d: str} | polars group-by d | polars last | polars sort-by [a] | polars collect",
|
||||
result: Some(
|
||||
NuDataFrame::new(
|
||||
false,
|
||||
df!(
|
||||
"d" => &["Orange", "Apple", "Banana"],
|
||||
"a" => &[2, 3, 5],
|
||||
"b" => &[0.50, 10.0, 14.0],
|
||||
"c" => &[true, false, true],
|
||||
|
||||
)
|
||||
.expect("dataframe creation should succeed"),
|
||||
)
|
||||
.into_value(Span::test_data()),
|
||||
),
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
@ -81,6 +102,9 @@ impl PluginCommand for LastDF {
|
||||
PolarsPluginObject::NuLazyFrame(lazy) => {
|
||||
command_lazy(plugin, engine, call, lazy).map_err(|e| e.into())
|
||||
}
|
||||
PolarsPluginObject::NuLazyGroupBy(groupby) => {
|
||||
command_groupby(plugin, engine, call, groupby).map_err(|e| e.into())
|
||||
}
|
||||
_ => {
|
||||
let expr = NuExpression::try_from_value(plugin, &value)?;
|
||||
let expr: NuExpression = expr.into_polars().last().into();
|
||||
@ -121,6 +145,20 @@ fn command_lazy(
|
||||
res.to_pipeline_data(plugin, engine, call.head)
|
||||
}
|
||||
|
||||
fn command_groupby(
|
||||
plugin: &PolarsPlugin,
|
||||
engine: &EngineInterface,
|
||||
call: &EvaluatedCall,
|
||||
groupby: NuLazyGroupBy,
|
||||
) -> Result<PipelineData, ShellError> {
|
||||
let rows: Option<usize> = call.opt(0)?;
|
||||
let rows = rows.unwrap_or(DEFAULT_ROWS);
|
||||
let res = groupby.to_polars().tail(Some(rows));
|
||||
let res: NuLazyFrame = res.into();
|
||||
|
||||
res.to_pipeline_data(plugin, engine, call.head)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use crate::test::test_polars_plugin_command;
|
||||
|
@ -27,7 +27,7 @@ import sys
|
||||
import json
|
||||
|
||||
|
||||
NUSHELL_VERSION = "0.105.0"
|
||||
NUSHELL_VERSION = "0.105.2"
|
||||
PLUGIN_VERSION = "0.1.1" # bump if you change commands!
|
||||
|
||||
|
||||
|
@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu_plugin_quer
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
name = "nu_plugin_query"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
|
||||
[lib]
|
||||
doctest = false
|
||||
@ -16,8 +16,8 @@ name = "nu_plugin_query"
|
||||
bench = false
|
||||
|
||||
[dependencies]
|
||||
nu-plugin = { path = "../nu-plugin", version = "0.105.0" }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.0" }
|
||||
nu-plugin = { path = "../nu-plugin", version = "0.105.2" }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.2" }
|
||||
|
||||
gjson = "0.8"
|
||||
scraper = { default-features = false, version = "0.23" }
|
||||
|
@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu_plugin_stre
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
name = "nu_plugin_stress_internals"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
|
||||
[[bin]]
|
||||
name = "nu_plugin_stress_internals"
|
||||
|
@ -5,15 +5,15 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nuon"
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
name = "nuon"
|
||||
version = "0.105.0"
|
||||
version = "0.105.2"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
nu-parser = { path = "../nu-parser", version = "0.105.0" }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.0", default-features = false }
|
||||
nu-engine = { path = "../nu-engine", version = "0.105.0", default-features = false }
|
||||
nu-utils = { path = "../nu-utils", version = "0.105.0", default-features = false }
|
||||
nu-parser = { path = "../nu-parser", version = "0.105.2" }
|
||||
nu-protocol = { path = "../nu-protocol", version = "0.105.2", default-features = false }
|
||||
nu-engine = { path = "../nu-engine", version = "0.105.2", default-features = false }
|
||||
nu-utils = { path = "../nu-utils", version = "0.105.2", default-features = false }
|
||||
|
||||
[dev-dependencies]
|
||||
chrono = { workspace = true }
|
||||
|
@ -856,6 +856,36 @@ fn overlay_hide_renamed_overlay() {
|
||||
assert!(actual_repl.err.contains("external_command"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn overlay_hide_restore_hidden_env() {
|
||||
let inp = &[
|
||||
"$env.foo = 'bar'",
|
||||
"overlay new aa",
|
||||
"hide-env foo",
|
||||
"overlay hide aa",
|
||||
"$env.foo",
|
||||
];
|
||||
|
||||
let actual_repl = nu!(nu_repl_code(inp));
|
||||
|
||||
assert_eq!(actual_repl.out, "bar");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn overlay_hide_dont_restore_hidden_env_which_is_introduce_currently() {
|
||||
let inp = &[
|
||||
"overlay new aa",
|
||||
"$env.foo = 'bar'",
|
||||
"hide-env foo", // hide the env in overlay `aa`
|
||||
"overlay hide aa",
|
||||
"'foo' in $env",
|
||||
];
|
||||
|
||||
let actual_repl = nu!(nu_repl_code(inp));
|
||||
|
||||
assert_eq!(actual_repl.out, "false");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn overlay_hide_and_add_renamed_overlay() {
|
||||
let inp = &[
|
||||
|
@ -242,6 +242,29 @@ fn test_alternate_config_path() {
|
||||
assert_eq!(actual.out, env_path.to_string_lossy().to_string());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn use_last_config_path() {
|
||||
let config_file = "crates/nu-utils/src/default_files/scaffold_config.nu";
|
||||
let env_file = "crates/nu-utils/src/default_files/scaffold_env.nu";
|
||||
|
||||
let cwd = std::env::current_dir().expect("Could not get current working directory");
|
||||
|
||||
let config_path =
|
||||
nu_path::canonicalize_with(config_file, &cwd).expect("Could not get config path");
|
||||
let actual = nu!(
|
||||
cwd: &cwd,
|
||||
format!("nu --config non-existing-path --config another-random-path.nu --config {config_path:?} -c '$nu.config-path'")
|
||||
);
|
||||
assert_eq!(actual.out, config_path.to_string_lossy().to_string());
|
||||
|
||||
let env_path = nu_path::canonicalize_with(env_file, &cwd).expect("Could not get env path");
|
||||
let actual = nu!(
|
||||
cwd: &cwd,
|
||||
format!("nu --env-config non-existing-path --env-config {env_path:?} -c '$nu.env-path'")
|
||||
);
|
||||
assert_eq!(actual.out, env_path.to_string_lossy().to_string());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_xdg_config_empty() {
|
||||
Playground::setup("xdg_config_empty", |_, playground| {
|
||||
|
@ -279,6 +279,18 @@ fn path_argument_dont_auto_expand_if_double_quoted() -> TestResult {
|
||||
run_test(r#"def spam [foo: path] { echo $foo }; spam "~/aa""#, "~/aa")
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn path_argument_dont_make_absolute_if_unquoted() -> TestResult {
|
||||
#[cfg(windows)]
|
||||
let expected = "..\\bar";
|
||||
#[cfg(not(windows))]
|
||||
let expected = "../bar";
|
||||
run_test(
|
||||
r#"def spam [foo: path] { echo $foo }; spam foo/.../bar"#,
|
||||
expected,
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn dont_allow_implicit_casting_between_glob_and_string() -> TestResult {
|
||||
let _ = fail_test(
|
||||
|
Reference in New Issue
Block a user