Compare commits

...

3 Commits
main ... 0.87.1

Author SHA1 Message Date
3d631490bc Bump version to 0.87.1 (#11056) 2023-11-18 18:46:36 +01:00
68211dea3e Send only absolute paths to uu_cp (#11080)
# Description
Fixes https://github.com/nushell/nushell/issues/10832

Replaces: https://github.com/nushell/nushell/pull/10843
2023-11-18 17:57:49 +01:00
b8e9293c45 Fix rm path handling (#11064)
# Description
Fixes issue #11061 where `rm` fails to find a file after a `cd`. It
looks like the new glob functions do not return absolute file paths
which we forgot to account for.

# Tests
Added a test (fails on current main, but passes with this PR).

---------

Co-authored-by: Jakub Žádník <kubouch@gmail.com>
2023-11-18 17:57:49 +01:00
38 changed files with 245 additions and 204 deletions

58
Cargo.lock generated
View File

@ -2645,7 +2645,7 @@ dependencies = [
[[package]]
name = "nu"
version = "0.87.0"
version = "0.87.1"
dependencies = [
"assert_cmd",
"criterion",
@ -2702,7 +2702,7 @@ dependencies = [
[[package]]
name = "nu-cli"
version = "0.87.0"
version = "0.87.1"
dependencies = [
"chrono",
"crossterm 0.27.0",
@ -2734,7 +2734,7 @@ dependencies = [
[[package]]
name = "nu-cmd-base"
version = "0.87.0"
version = "0.87.1"
dependencies = [
"indexmap 2.1.0",
"miette",
@ -2750,7 +2750,7 @@ dependencies = [
[[package]]
name = "nu-cmd-dataframe"
version = "0.87.0"
version = "0.87.1"
dependencies = [
"chrono",
"chrono-tz",
@ -2770,7 +2770,7 @@ dependencies = [
[[package]]
name = "nu-cmd-extra"
version = "0.87.0"
version = "0.87.1"
dependencies = [
"ahash",
"fancy-regex",
@ -2795,7 +2795,7 @@ dependencies = [
[[package]]
name = "nu-cmd-lang"
version = "0.87.0"
version = "0.87.1"
dependencies = [
"fancy-regex",
"itertools 0.11.0",
@ -2809,7 +2809,7 @@ dependencies = [
[[package]]
name = "nu-color-config"
version = "0.87.0"
version = "0.87.1"
dependencies = [
"nu-ansi-term",
"nu-engine",
@ -2822,7 +2822,7 @@ dependencies = [
[[package]]
name = "nu-command"
version = "0.87.0"
version = "0.87.1"
dependencies = [
"alphanumeric-sort",
"base64",
@ -2922,7 +2922,7 @@ dependencies = [
[[package]]
name = "nu-engine"
version = "0.87.0"
version = "0.87.1"
dependencies = [
"nu-glob",
"nu-path",
@ -2932,7 +2932,7 @@ dependencies = [
[[package]]
name = "nu-explore"
version = "0.87.0"
version = "0.87.1"
dependencies = [
"ansi-str",
"crossterm 0.27.0",
@ -2953,14 +2953,14 @@ dependencies = [
[[package]]
name = "nu-glob"
version = "0.87.0"
version = "0.87.1"
dependencies = [
"doc-comment",
]
[[package]]
name = "nu-json"
version = "0.87.0"
version = "0.87.1"
dependencies = [
"linked-hash-map",
"num-traits",
@ -2969,7 +2969,7 @@ dependencies = [
[[package]]
name = "nu-lsp"
version = "0.87.0"
version = "0.87.1"
dependencies = [
"assert-json-diff",
"lsp-server",
@ -2990,7 +2990,7 @@ dependencies = [
[[package]]
name = "nu-parser"
version = "0.87.0"
version = "0.87.1"
dependencies = [
"bytesize",
"chrono",
@ -3006,7 +3006,7 @@ dependencies = [
[[package]]
name = "nu-path"
version = "0.87.0"
version = "0.87.1"
dependencies = [
"dirs-next",
"omnipath",
@ -3015,7 +3015,7 @@ dependencies = [
[[package]]
name = "nu-plugin"
version = "0.87.0"
version = "0.87.1"
dependencies = [
"bincode",
"nu-engine",
@ -3027,7 +3027,7 @@ dependencies = [
[[package]]
name = "nu-pretty-hex"
version = "0.87.0"
version = "0.87.1"
dependencies = [
"heapless",
"nu-ansi-term",
@ -3036,7 +3036,7 @@ dependencies = [
[[package]]
name = "nu-protocol"
version = "0.87.0"
version = "0.87.1"
dependencies = [
"byte-unit",
"chrono",
@ -3061,7 +3061,7 @@ dependencies = [
[[package]]
name = "nu-std"
version = "0.87.0"
version = "0.87.1"
dependencies = [
"miette",
"nu-engine",
@ -3071,7 +3071,7 @@ dependencies = [
[[package]]
name = "nu-system"
version = "0.87.0"
version = "0.87.1"
dependencies = [
"chrono",
"libc",
@ -3088,7 +3088,7 @@ dependencies = [
[[package]]
name = "nu-table"
version = "0.87.0"
version = "0.87.1"
dependencies = [
"fancy-regex",
"nu-ansi-term",
@ -3102,7 +3102,7 @@ dependencies = [
[[package]]
name = "nu-term-grid"
version = "0.87.0"
version = "0.87.1"
dependencies = [
"nu-utils",
"unicode-width",
@ -3110,7 +3110,7 @@ dependencies = [
[[package]]
name = "nu-test-support"
version = "0.87.0"
version = "0.87.1"
dependencies = [
"hamcrest2",
"nu-glob",
@ -3123,7 +3123,7 @@ dependencies = [
[[package]]
name = "nu-utils"
version = "0.87.0"
version = "0.87.1"
dependencies = [
"crossterm_winapi",
"log",
@ -3146,7 +3146,7 @@ dependencies = [
[[package]]
name = "nu_plugin_example"
version = "0.87.0"
version = "0.87.1"
dependencies = [
"nu-plugin",
"nu-protocol",
@ -3154,7 +3154,7 @@ dependencies = [
[[package]]
name = "nu_plugin_formats"
version = "0.87.0"
version = "0.87.1"
dependencies = [
"eml-parser",
"ical",
@ -3166,7 +3166,7 @@ dependencies = [
[[package]]
name = "nu_plugin_gstat"
version = "0.87.0"
version = "0.87.1"
dependencies = [
"git2",
"nu-plugin",
@ -3175,7 +3175,7 @@ dependencies = [
[[package]]
name = "nu_plugin_inc"
version = "0.87.0"
version = "0.87.1"
dependencies = [
"nu-plugin",
"nu-protocol",
@ -3184,7 +3184,7 @@ dependencies = [
[[package]]
name = "nu_plugin_query"
version = "0.87.0"
version = "0.87.1"
dependencies = [
"gjson",
"nu-engine",

View File

@ -11,7 +11,7 @@ license = "MIT"
name = "nu"
repository = "https://github.com/nushell/nushell"
rust-version = "1.60"
version = "0.87.0"
version = "0.87.1"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@ -47,27 +47,27 @@ members = [
]
[dependencies]
nu-cli = { path = "./crates/nu-cli", version = "0.87.0" }
nu-color-config = { path = "./crates/nu-color-config", version = "0.87.0" }
nu-cmd-base = { path = "./crates/nu-cmd-base", version = "0.87.0" }
nu-cmd-lang = { path = "./crates/nu-cmd-lang", version = "0.87.0" }
nu-cmd-dataframe = { path = "./crates/nu-cmd-dataframe", version = "0.87.0", features = ["dataframe"], optional = true }
nu-cmd-extra = { path = "./crates/nu-cmd-extra", version = "0.87.0", optional = true }
nu-command = { path = "./crates/nu-command", version = "0.87.0" }
nu-engine = { path = "./crates/nu-engine", version = "0.87.0" }
nu-explore = { path = "./crates/nu-explore", version = "0.87.0" }
nu-json = { path = "./crates/nu-json", version = "0.87.0" }
nu-lsp = { path = "./crates/nu-lsp/", version = "0.87.0" }
nu-parser = { path = "./crates/nu-parser", version = "0.87.0" }
nu-path = { path = "./crates/nu-path", version = "0.87.0" }
nu-plugin = { path = "./crates/nu-plugin", optional = true, version = "0.87.0" }
nu-pretty-hex = { path = "./crates/nu-pretty-hex", version = "0.87.0" }
nu-protocol = { path = "./crates/nu-protocol", version = "0.87.0" }
nu-system = { path = "./crates/nu-system", version = "0.87.0" }
nu-table = { path = "./crates/nu-table", version = "0.87.0" }
nu-term-grid = { path = "./crates/nu-term-grid", version = "0.87.0" }
nu-std = { path = "./crates/nu-std", version = "0.87.0" }
nu-utils = { path = "./crates/nu-utils", version = "0.87.0" }
nu-cli = { path = "./crates/nu-cli", version = "0.87.1" }
nu-color-config = { path = "./crates/nu-color-config", version = "0.87.1" }
nu-cmd-base = { path = "./crates/nu-cmd-base", version = "0.87.1" }
nu-cmd-lang = { path = "./crates/nu-cmd-lang", version = "0.87.1" }
nu-cmd-dataframe = { path = "./crates/nu-cmd-dataframe", version = "0.87.1", features = ["dataframe"], optional = true }
nu-cmd-extra = { path = "./crates/nu-cmd-extra", version = "0.87.1", optional = true }
nu-command = { path = "./crates/nu-command", version = "0.87.1" }
nu-engine = { path = "./crates/nu-engine", version = "0.87.1" }
nu-explore = { path = "./crates/nu-explore", version = "0.87.1" }
nu-json = { path = "./crates/nu-json", version = "0.87.1" }
nu-lsp = { path = "./crates/nu-lsp/", version = "0.87.1" }
nu-parser = { path = "./crates/nu-parser", version = "0.87.1" }
nu-path = { path = "./crates/nu-path", version = "0.87.1" }
nu-plugin = { path = "./crates/nu-plugin", optional = true, version = "0.87.1" }
nu-pretty-hex = { path = "./crates/nu-pretty-hex", version = "0.87.1" }
nu-protocol = { path = "./crates/nu-protocol", version = "0.87.1" }
nu-system = { path = "./crates/nu-system", version = "0.87.1" }
nu-table = { path = "./crates/nu-table", version = "0.87.1" }
nu-term-grid = { path = "./crates/nu-term-grid", version = "0.87.1" }
nu-std = { path = "./crates/nu-std", version = "0.87.1" }
nu-utils = { path = "./crates/nu-utils", version = "0.87.1" }
nu-ansi-term = "0.49.0"
reedline = { version = "0.26.0", features = ["bashisms", "sqlite"] }
@ -97,7 +97,7 @@ nix = { version = "0.27", default-features = false, features = [
] }
[dev-dependencies]
nu-test-support = { path = "./crates/nu-test-support", version = "0.87.0" }
nu-test-support = { path = "./crates/nu-test-support", version = "0.87.1" }
assert_cmd = "2.0"
criterion = "0.5"
pretty_assertions = "1.4"

View File

@ -5,25 +5,25 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-cli"
edition = "2021"
license = "MIT"
name = "nu-cli"
version = "0.87.0"
version = "0.87.1"
[lib]
bench = false
[dev-dependencies]
nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.87.0" }
nu-command = { path = "../nu-command", version = "0.87.0" }
nu-test-support = { path = "../nu-test-support", version = "0.87.0" }
nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.87.1" }
nu-command = { path = "../nu-command", version = "0.87.1" }
nu-test-support = { path = "../nu-test-support", version = "0.87.1" }
rstest = { version = "0.18.1", default-features = false }
[dependencies]
nu-cmd-base = { path = "../nu-cmd-base", version = "0.87.0" }
nu-engine = { path = "../nu-engine", version = "0.87.0" }
nu-path = { path = "../nu-path", version = "0.87.0" }
nu-parser = { path = "../nu-parser", version = "0.87.0" }
nu-protocol = { path = "../nu-protocol", version = "0.87.0" }
nu-utils = { path = "../nu-utils", version = "0.87.0" }
nu-color-config = { path = "../nu-color-config", version = "0.87.0" }
nu-cmd-base = { path = "../nu-cmd-base", version = "0.87.1" }
nu-engine = { path = "../nu-engine", version = "0.87.1" }
nu-path = { path = "../nu-path", version = "0.87.1" }
nu-parser = { path = "../nu-parser", version = "0.87.1" }
nu-protocol = { path = "../nu-protocol", version = "0.87.1" }
nu-utils = { path = "../nu-utils", version = "0.87.1" }
nu-color-config = { path = "../nu-color-config", version = "0.87.1" }
nu-ansi-term = "0.49.0"
reedline = { version = "0.26.0", features = ["bashisms", "sqlite"] }

View File

@ -5,21 +5,21 @@ edition = "2021"
license = "MIT"
name = "nu-cmd-base"
repository = "https://github.com/nushell/nushell/tree/main/crates/nu-cmd-base"
version = "0.87.0"
version = "0.87.1"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
nu-engine = { path = "../nu-engine", version = "0.87.0" }
nu-glob = { path = "../nu-glob", version = "0.87.0" }
nu-parser = { path = "../nu-parser", version = "0.87.0" }
nu-path = { path = "../nu-path", version = "0.87.0" }
nu-protocol = { path = "../nu-protocol", version = "0.87.0" }
nu-utils = { path = "../nu-utils", version = "0.87.0" }
nu-engine = { path = "../nu-engine", version = "0.87.1" }
nu-glob = { path = "../nu-glob", version = "0.87.1" }
nu-parser = { path = "../nu-parser", version = "0.87.1" }
nu-path = { path = "../nu-path", version = "0.87.1" }
nu-protocol = { path = "../nu-protocol", version = "0.87.1" }
nu-utils = { path = "../nu-utils", version = "0.87.1" }
indexmap = "2.1"
miette = "5.10.0"
[dev-dependencies]
nu-test-support = { path = "../nu-test-support", version = "0.87.0" }
nu-test-support = { path = "../nu-test-support", version = "0.87.1" }
rstest = "0.18.2"

View File

@ -5,7 +5,7 @@ edition = "2021"
license = "MIT"
name = "nu-cmd-dataframe"
repository = "https://github.com/nushell/nushell/tree/main/crates/nu-cmd-dataframe"
version = "0.87.0"
version = "0.87.1"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@ -13,9 +13,9 @@ version = "0.87.0"
bench = false
[dependencies]
nu-engine = { path = "../nu-engine", version = "0.87.0" }
nu-parser = { path = "../nu-parser", version = "0.87.0" }
nu-protocol = { path = "../nu-protocol", version = "0.87.0" }
nu-engine = { path = "../nu-engine", version = "0.87.1" }
nu-parser = { path = "../nu-parser", version = "0.87.1" }
nu-protocol = { path = "../nu-protocol", version = "0.87.1" }
# Potential dependencies for extras
chrono = { version = "0.4", features = ["std", "unstable-locales"], default-features = false }
@ -66,5 +66,5 @@ dataframe = ["num", "polars", "polars-io", "sqlparser"]
default = []
[dev-dependencies]
nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.87.0" }
nu-test-support = { path = "../nu-test-support", version = "0.87.0" }
nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.87.1" }
nu-test-support = { path = "../nu-test-support", version = "0.87.1" }

View File

@ -5,7 +5,7 @@ edition = "2021"
license = "MIT"
name = "nu-cmd-extra"
repository = "https://github.com/nushell/nushell/tree/main/crates/nu-cmd-extra"
version = "0.87.0"
version = "0.87.1"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@ -13,11 +13,11 @@ version = "0.87.0"
bench = false
[dependencies]
nu-engine = { path = "../nu-engine", version = "0.87.0" }
nu-parser = { path = "../nu-parser", version = "0.87.0" }
nu-protocol = { path = "../nu-protocol", version = "0.87.0" }
nu-cmd-base = { path = "../nu-cmd-base", version = "0.87.0" }
nu-utils = { path = "../nu-utils", version = "0.87.0" }
nu-engine = { path = "../nu-engine", version = "0.87.1" }
nu-parser = { path = "../nu-parser", version = "0.87.1" }
nu-protocol = { path = "../nu-protocol", version = "0.87.1" }
nu-cmd-base = { path = "../nu-cmd-base", version = "0.87.1" }
nu-utils = { path = "../nu-utils", version = "0.87.1" }
# Potential dependencies for extras
heck = "0.4.1"
@ -27,8 +27,8 @@ nu-ansi-term = "0.49.0"
fancy-regex = "0.11.0"
rust-embed = "8.0.0"
serde = "1.0.164"
nu-pretty-hex = { version = "0.87.0", path = "../nu-pretty-hex" }
nu-json = { version = "0.87.0", path = "../nu-json" }
nu-pretty-hex = { version = "0.87.1", path = "../nu-pretty-hex" }
nu-json = { version = "0.87.1", path = "../nu-json" }
serde_urlencoded = "0.7.1"
htmlescape = "0.3.1"
@ -37,6 +37,6 @@ extra = ["default"]
default = []
[dev-dependencies]
nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.87.0" }
nu-command = { path = "../nu-command", version = "0.87.0" }
nu-test-support = { path = "../nu-test-support", version = "0.87.0" }
nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.87.1" }
nu-command = { path = "../nu-command", version = "0.87.1" }
nu-test-support = { path = "../nu-test-support", version = "0.87.1" }

View File

@ -6,16 +6,16 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-cmd-lang"
edition = "2021"
license = "MIT"
name = "nu-cmd-lang"
version = "0.87.0"
version = "0.87.1"
[lib]
bench = false
[dependencies]
nu-engine = { path = "../nu-engine", version = "0.87.0" }
nu-parser = { path = "../nu-parser", version = "0.87.0" }
nu-protocol = { path = "../nu-protocol", version = "0.87.0" }
nu-utils = { path = "../nu-utils", version = "0.87.0" }
nu-engine = { path = "../nu-engine", version = "0.87.1" }
nu-parser = { path = "../nu-parser", version = "0.87.1" }
nu-protocol = { path = "../nu-protocol", version = "0.87.1" }
nu-utils = { path = "../nu-utils", version = "0.87.1" }
nu-ansi-term = "0.49.0"
fancy-regex = "0.11"

View File

@ -5,19 +5,19 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-color-confi
edition = "2021"
license = "MIT"
name = "nu-color-config"
version = "0.87.0"
version = "0.87.1"
[lib]
bench = false
[dependencies]
nu-protocol = { path = "../nu-protocol", version = "0.87.0" }
nu-protocol = { path = "../nu-protocol", version = "0.87.1" }
nu-ansi-term = "0.49.0"
nu-utils = { path = "../nu-utils", version = "0.87.0" }
nu-engine = { path = "../nu-engine", version = "0.87.0" }
nu-json = { path = "../nu-json", version = "0.87.0" }
nu-utils = { path = "../nu-utils", version = "0.87.1" }
nu-engine = { path = "../nu-engine", version = "0.87.1" }
nu-json = { path = "../nu-json", version = "0.87.1" }
serde = { version = "1.0", features = ["derive"] }
[dev-dependencies]
nu-test-support = { path = "../nu-test-support", version = "0.87.0" }
nu-test-support = { path = "../nu-test-support", version = "0.87.1" }

View File

@ -5,7 +5,7 @@ edition = "2021"
license = "MIT"
name = "nu-command"
repository = "https://github.com/nushell/nushell/tree/main/crates/nu-command"
version = "0.87.0"
version = "0.87.1"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@ -14,19 +14,19 @@ bench = false
[dependencies]
nu-ansi-term = "0.49.0"
nu-cmd-base = { path = "../nu-cmd-base", version = "0.87.0" }
nu-color-config = { path = "../nu-color-config", version = "0.87.0" }
nu-engine = { path = "../nu-engine", version = "0.87.0" }
nu-glob = { path = "../nu-glob", version = "0.87.0" }
nu-json = { path = "../nu-json", version = "0.87.0" }
nu-parser = { path = "../nu-parser", version = "0.87.0" }
nu-path = { path = "../nu-path", version = "0.87.0" }
nu-pretty-hex = { path = "../nu-pretty-hex", version = "0.87.0" }
nu-protocol = { path = "../nu-protocol", version = "0.87.0" }
nu-system = { path = "../nu-system", version = "0.87.0" }
nu-table = { path = "../nu-table", version = "0.87.0" }
nu-term-grid = { path = "../nu-term-grid", version = "0.87.0" }
nu-utils = { path = "../nu-utils", version = "0.87.0" }
nu-cmd-base = { path = "../nu-cmd-base", version = "0.87.1" }
nu-color-config = { path = "../nu-color-config", version = "0.87.1" }
nu-engine = { path = "../nu-engine", version = "0.87.1" }
nu-glob = { path = "../nu-glob", version = "0.87.1" }
nu-json = { path = "../nu-json", version = "0.87.1" }
nu-parser = { path = "../nu-parser", version = "0.87.1" }
nu-path = { path = "../nu-path", version = "0.87.1" }
nu-pretty-hex = { path = "../nu-pretty-hex", version = "0.87.1" }
nu-protocol = { path = "../nu-protocol", version = "0.87.1" }
nu-system = { path = "../nu-system", version = "0.87.1" }
nu-table = { path = "../nu-table", version = "0.87.1" }
nu-term-grid = { path = "../nu-term-grid", version = "0.87.1" }
nu-utils = { path = "../nu-utils", version = "0.87.1" }
alphanumeric-sort = "1.5"
base64 = "0.21"
@ -126,8 +126,8 @@ trash-support = ["trash"]
which-support = ["which"]
[dev-dependencies]
nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.87.0" }
nu-test-support = { path = "../nu-test-support", version = "0.87.0" }
nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.87.1" }
nu-test-support = { path = "../nu-test-support", version = "0.87.1" }
dirs-next = "2.0"
mockito = { version = "1.2", default-features = false }

View File

@ -250,7 +250,7 @@ fn rm(
Ok(files) => {
for file in files {
match file {
Ok(ref f) => {
Ok(f) => {
if !target_exists {
target_exists = true;
}
@ -263,7 +263,9 @@ fn rm(
continue;
}
all_targets.entry(f.clone()).or_insert_with(|| target.span);
all_targets
.entry(nu_path::expand_path_with(f, &currentdir_path))
.or_insert_with(|| target.span);
}
Err(e) => {
return Err(ShellError::GenericError(

View File

@ -201,6 +201,14 @@ impl Command for UCp {
sources.append(&mut app_vals);
}
// Make sure to send absolute paths to avoid uu_cp looking for cwd in std::env which is not
// supported in Nushell
for src in sources.iter_mut() {
if !src.is_absolute() {
*src = nu_path::expand_path_with(&src, &cwd);
}
}
let options = uu_cp::Options {
overwrite,
reflink_mode,

View File

@ -50,11 +50,11 @@ impl Command for UMkdir {
call: &Call,
_input: PipelineData,
) -> Result<PipelineData, ShellError> {
let path = current_dir(engine_state, stack)?;
let cwd = current_dir(engine_state, stack)?;
let mut directories = call
.rest::<String>(engine_state, stack, 0)?
.into_iter()
.map(|dir| path.join(dir))
.map(|dir| nu_path::expand_path_with(dir, &cwd))
.peekable();
let is_verbose = call.has_flag("verbose");

View File

@ -1,3 +1,5 @@
use std::path::Path;
use nu_test_support::fs::file_contents;
use nu_test_support::fs::{
files_exist_at, AbsoluteFile,
@ -5,7 +7,6 @@ use nu_test_support::fs::{
};
use nu_test_support::nu;
use nu_test_support::playground::Playground;
use std::path::Path;
fn get_file_hash<T: std::fmt::Display>(file: T) -> String {
nu!("open -r {} | to text | hash md5", file).out
@ -127,9 +128,9 @@ fn copies_the_directory_inside_directory_if_path_to_copy_is_directory_and_with_r
vec![
Path::new("yehuda.txt"),
Path::new("jttxt"),
Path::new("andres.txt")
Path::new("andres.txt"),
],
&expected_dir
&expected_dir,
));
})
}
@ -175,15 +176,15 @@ fn deep_copies_with_recursive_flag_impl(progress: bool) {
assert!(expected_dir.exists());
assert!(files_exist_at(
vec![Path::new("errors.txt"), Path::new("multishells.txt")],
jts_expected_copied_dir
jts_expected_copied_dir,
));
assert!(files_exist_at(
vec![Path::new("coverage.txt"), Path::new("commands.txt")],
andres_expected_copied_dir
andres_expected_copied_dir,
));
assert!(files_exist_at(
vec![Path::new("defer-evaluation.txt")],
yehudas_expected_copied_dir
yehudas_expected_copied_dir,
));
})
}
@ -221,7 +222,7 @@ fn copies_using_path_with_wildcard_impl(progress: bool) {
Path::new("sgml_description.json"),
Path::new("utf16.ini"),
],
dirs.test()
dirs.test(),
));
// Check integrity after the copy is done
@ -266,7 +267,7 @@ fn copies_using_a_glob_impl(progress: bool) {
Path::new("sgml_description.json"),
Path::new("utf16.ini"),
],
dirs.test()
dirs.test(),
));
// Check integrity after the copy is done
@ -340,7 +341,7 @@ fn copy_files_using_glob_two_parents_up_using_multiple_dots_imp(progress: bool)
"kevin.txt",
"many_more.ppl",
],
dirs.test()
dirs.test(),
));
})
}
@ -615,3 +616,18 @@ fn copy_file_with_update_flag_impl(progress: bool) {
assert_eq!(actual.out, "newest_body");
});
}
#[test]
fn cp_with_cd() {
Playground::setup("cp_test_20", |_dirs, sandbox| {
sandbox
.mkdir("tmp_dir")
.with_files(vec![FileWithContent("tmp_dir/file.txt", "body")]);
let actual = nu!(
cwd: sandbox.cwd(),
r#"do { cd tmp_dir; let f = 'file.txt'; cp $f .. }; open file.txt"#,
);
assert!(actual.out.contains("body"));
});
}

View File

@ -375,6 +375,21 @@ fn removes_symlink() {
});
}
#[test]
fn removes_file_after_cd() {
Playground::setup("rm_after_cd", |dirs, sandbox| {
sandbox.with_files(vec![EmptyFile("delete.txt")]);
nu!(
cwd: dirs.root(),
"let file = 'delete.txt'; cd rm_after_cd; rm $file",
);
let path = dirs.test().join("delete.txt");
assert!(!path.exists());
})
}
struct Cleanup<'a> {
dir_to_clean: &'a Path,
}

View File

@ -5,16 +5,16 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-engine"
edition = "2021"
license = "MIT"
name = "nu-engine"
version = "0.87.0"
version = "0.87.1"
[lib]
bench = false
[dependencies]
nu-protocol = { path = "../nu-protocol", features = ["plugin"], version = "0.87.0" }
nu-path = { path = "../nu-path", version = "0.87.0" }
nu-glob = { path = "../nu-glob", version = "0.87.0" }
nu-utils = { path = "../nu-utils", version = "0.87.0" }
nu-protocol = { path = "../nu-protocol", features = ["plugin"], version = "0.87.1" }
nu-path = { path = "../nu-path", version = "0.87.1" }
nu-glob = { path = "../nu-glob", version = "0.87.1" }
nu-utils = { path = "../nu-utils", version = "0.87.1" }
[features]
plugin = []

View File

@ -5,20 +5,20 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-explore"
edition = "2021"
license = "MIT"
name = "nu-explore"
version = "0.87.0"
version = "0.87.1"
[lib]
bench = false
[dependencies]
nu-ansi-term = "0.49.0"
nu-protocol = { path = "../nu-protocol", version = "0.87.0" }
nu-parser = { path = "../nu-parser", version = "0.87.0" }
nu-color-config = { path = "../nu-color-config", version = "0.87.0" }
nu-engine = { path = "../nu-engine", version = "0.87.0" }
nu-table = { path = "../nu-table", version = "0.87.0" }
nu-json = { path = "../nu-json", version = "0.87.0" }
nu-utils = { path = "../nu-utils", version = "0.87.0" }
nu-protocol = { path = "../nu-protocol", version = "0.87.1" }
nu-parser = { path = "../nu-parser", version = "0.87.1" }
nu-color-config = { path = "../nu-color-config", version = "0.87.1" }
nu-engine = { path = "../nu-engine", version = "0.87.1" }
nu-table = { path = "../nu-table", version = "0.87.1" }
nu-json = { path = "../nu-json", version = "0.87.1" }
nu-utils = { path = "../nu-utils", version = "0.87.1" }
terminal_size = "0.2"
strip-ansi-escapes = "0.2.0"

View File

@ -1,6 +1,6 @@
[package]
name = "nu-glob"
version = "0.87.0"
version = "0.87.1"
authors = ["The Nushell Project Developers", "The Rust Project Developers"]
license = "MIT/Apache-2.0"
description = """

View File

@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-json"
edition = "2021"
license = "MIT"
name = "nu-json"
version = "0.87.0"
version = "0.87.1"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@ -22,5 +22,5 @@ num-traits = "0.2"
serde = "1.0"
[dev-dependencies]
# nu-path = { path="../nu-path", version = "0.87.0" }
# nu-path = { path="../nu-path", version = "0.87.1" }
# serde_json = "1.0"

View File

@ -3,14 +3,14 @@ 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.87.0"
version = "0.87.1"
edition = "2021"
license = "MIT"
[dependencies]
nu-cli = { path = "../nu-cli", version = "0.87.0" }
nu-parser = { path = "../nu-parser", version = "0.87.0" }
nu-protocol = { path = "../nu-protocol", version = "0.87.0" }
nu-cli = { path = "../nu-cli", version = "0.87.1" }
nu-parser = { path = "../nu-parser", version = "0.87.1" }
nu-protocol = { path = "../nu-protocol", version = "0.87.1" }
reedline = { version = "0.26" }
@ -22,9 +22,9 @@ serde = "1.0"
serde_json = "1.0"
[dev-dependencies]
nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.87.0" }
nu-command = { path = "../nu-command", version = "0.87.0" }
nu-test-support = { path = "../nu-test-support", version = "0.87.0" }
nu-cmd-lang = { path = "../nu-cmd-lang", version = "0.87.1" }
nu-command = { path = "../nu-command", version = "0.87.1" }
nu-test-support = { path = "../nu-test-support", version = "0.87.1" }
assert-json-diff = "2.0"
tempfile = "3.2"

View File

@ -5,17 +5,17 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-parser"
edition = "2021"
license = "MIT"
name = "nu-parser"
version = "0.87.0"
version = "0.87.1"
exclude = ["/fuzz"]
[lib]
bench = false
[dependencies]
nu-engine = { path = "../nu-engine", version = "0.87.0" }
nu-path = { path = "../nu-path", version = "0.87.0" }
nu-plugin = { path = "../nu-plugin", optional = true, version = "0.87.0" }
nu-protocol = { path = "../nu-protocol", version = "0.87.0" }
nu-engine = { path = "../nu-engine", version = "0.87.1" }
nu-path = { path = "../nu-path", version = "0.87.1" }
nu-plugin = { path = "../nu-plugin", optional = true, version = "0.87.1" }
nu-protocol = { path = "../nu-protocol", version = "0.87.1" }
bytesize = "1.3"
chrono = { default-features = false, features = ['std'], version = "0.4" }

View File

@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-path"
edition = "2021"
license = "MIT"
name = "nu-path"
version = "0.87.0"
version = "0.87.1"
exclude = ["/fuzz"]
[lib]

View File

@ -5,14 +5,14 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-plugin"
edition = "2021"
license = "MIT"
name = "nu-plugin"
version = "0.87.0"
version = "0.87.1"
[lib]
bench = false
[dependencies]
nu-engine = { path = "../nu-engine", version = "0.87.0" }
nu-protocol = { path = "../nu-protocol", version = "0.87.0" }
nu-engine = { path = "../nu-engine", version = "0.87.1" }
nu-protocol = { path = "../nu-protocol", version = "0.87.1" }
bincode = "1.3"
rmp-serde = "1.1"

View File

@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-pretty-hex"
edition = "2021"
license = "MIT"
name = "nu-pretty-hex"
version = "0.87.0"
version = "0.87.1"
[lib]
doctest = false

View File

@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-protocol"
edition = "2021"
license = "MIT"
name = "nu-protocol"
version = "0.87.0"
version = "0.87.1"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@ -13,9 +13,9 @@ version = "0.87.0"
bench = false
[dependencies]
nu-utils = { path = "../nu-utils", version = "0.87.0" }
nu-path = { path = "../nu-path", version = "0.87.0" }
nu-system = { path = "../nu-system", version = "0.87.0" }
nu-utils = { path = "../nu-utils", version = "0.87.1" }
nu-path = { path = "../nu-path", version = "0.87.1" }
nu-system = { path = "../nu-system", version = "0.87.1" }
byte-unit = "4.0"
chrono = { version = "0.4", features = [ "serde", "std", "unstable-locales" ], default-features = false }
@ -37,5 +37,5 @@ plugin = ["serde_json"]
serde_json = "1.0"
strum = "0.25"
strum_macros = "0.25"
nu-test-support = { path = "../nu-test-support", version = "0.87.0" }
nu-test-support = { path = "../nu-test-support", version = "0.87.1" }
rstest = "0.18"

View File

@ -5,10 +5,10 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-std"
edition = "2021"
license = "MIT"
name = "nu-std"
version = "0.87.0"
version = "0.87.1"
[dependencies]
miette = { version = "5.10", features = ["fancy-no-backtrace"] }
nu-parser = { version = "0.87.0", path = "../nu-parser" }
nu-protocol = { version = "0.87.0", path = "../nu-protocol" }
nu-engine = { version = "0.87.0", path = "../nu-engine" }
nu-parser = { version = "0.87.1", path = "../nu-parser" }
nu-protocol = { version = "0.87.1", path = "../nu-protocol" }
nu-engine = { version = "0.87.1", path = "../nu-engine" }

View File

@ -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.87.0"
version = "0.87.1"
edition = "2021"
license = "MIT"

View File

@ -5,20 +5,20 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-table"
edition = "2021"
license = "MIT"
name = "nu-table"
version = "0.87.0"
version = "0.87.1"
[lib]
bench = false
[dependencies]
nu-protocol = { path = "../nu-protocol", version = "0.87.0" }
nu-utils = { path = "../nu-utils", version = "0.87.0" }
nu-engine = { path = "../nu-engine", version = "0.87.0" }
nu-color-config = { path = "../nu-color-config", version = "0.87.0" }
nu-protocol = { path = "../nu-protocol", version = "0.87.1" }
nu-utils = { path = "../nu-utils", version = "0.87.1" }
nu-engine = { path = "../nu-engine", version = "0.87.1" }
nu-color-config = { path = "../nu-color-config", version = "0.87.1" }
nu-ansi-term = "0.49.0"
once_cell = "1.18"
fancy-regex = "0.11"
tabled = { version = "0.14.0", features = ["color"], default-features = false }
[dev-dependencies]
# nu-test-support = { path="../nu-test-support", version = "0.87.0" }
# nu-test-support = { path="../nu-test-support", version = "0.87.1" }

View File

@ -5,12 +5,12 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-term-grid"
edition = "2021"
license = "MIT"
name = "nu-term-grid"
version = "0.87.0"
version = "0.87.1"
[lib]
bench = false
[dependencies]
nu-utils = { path = "../nu-utils", version = "0.87.0" }
nu-utils = { path = "../nu-utils", version = "0.87.1" }
unicode-width = "0.1"

View File

@ -5,16 +5,16 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu-test-suppor
edition = "2021"
license = "MIT"
name = "nu-test-support"
version = "0.87.0"
version = "0.87.1"
[lib]
doctest = false
bench = false
[dependencies]
nu-path = { path = "../nu-path", version = "0.87.0" }
nu-glob = { path = "../nu-glob", version = "0.87.0" }
nu-utils = { path = "../nu-utils", version = "0.87.0" }
nu-path = { path = "../nu-path", version = "0.87.1" }
nu-glob = { path = "../nu-glob", version = "0.87.1" }
nu-utils = { path = "../nu-utils", version = "0.87.1" }
num-format = "0.4"
which = "4.3"

View File

@ -5,7 +5,7 @@ edition = "2021"
license = "MIT"
name = "nu-utils"
repository = "https://github.com/nushell/nushell/tree/main/crates/nu-utils"
version = "0.87.0"
version = "0.87.1"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[[bin]]

View File

@ -1,6 +1,6 @@
# Nushell Config File
#
# version = "0.87.0"
# version = "0.87.1"
# For more information on defining custom themes, see
# https://www.nushell.sh/book/coloring_and_theming.html

View File

@ -1,6 +1,6 @@
# Nushell Environment Config File
#
# version = "0.87.0"
# version = "0.87.1"
def create_left_prompt [] {
let home = $nu.home-path

View File

@ -10,7 +10,7 @@ name = "nu_plugin_custom_values"
bench = false
[dependencies]
nu-plugin = { path = "../nu-plugin", version = "0.87.0" }
nu-protocol = { path = "../nu-protocol", version = "0.87.0", features = ["plugin"] }
nu-plugin = { path = "../nu-plugin", version = "0.87.1" }
nu-protocol = { path = "../nu-protocol", version = "0.87.1", features = ["plugin"] }
serde = { version = "1.0", default-features = false }
typetag = "0.2"

View File

@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu_plugin_exam
edition = "2021"
license = "MIT"
name = "nu_plugin_example"
version = "0.87.0"
version = "0.87.1"
[[bin]]
name = "nu_plugin_example"
@ -15,5 +15,5 @@ bench = false
bench = false
[dependencies]
nu-plugin = { path = "../nu-plugin", version = "0.87.0" }
nu-protocol = { path = "../nu-protocol", version = "0.87.0", features = ["plugin"] }
nu-plugin = { path = "../nu-plugin", version = "0.87.1" }
nu-protocol = { path = "../nu-protocol", version = "0.87.1", features = ["plugin"] }

View File

@ -5,12 +5,12 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu_plugin_form
edition = "2021"
license = "MIT"
name = "nu_plugin_formats"
version = "0.87.0"
version = "0.87.1"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
nu-plugin = { path = "../nu-plugin", version = "0.87.0" }
nu-protocol = { path = "../nu-protocol", version = "0.87.0", features = ["plugin"] }
nu-plugin = { path = "../nu-plugin", version = "0.87.1" }
nu-protocol = { path = "../nu-protocol", version = "0.87.1", features = ["plugin"] }
indexmap = "2.1"
eml-parser = "0.1"

View File

@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu_plugin_gsta
edition = "2021"
license = "MIT"
name = "nu_plugin_gstat"
version = "0.87.0"
version = "0.87.1"
[lib]
doctest = false
@ -16,7 +16,7 @@ name = "nu_plugin_gstat"
bench = false
[dependencies]
nu-plugin = { path = "../nu-plugin", version = "0.87.0" }
nu-protocol = { path = "../nu-protocol", version = "0.87.0" }
nu-plugin = { path = "../nu-plugin", version = "0.87.1" }
nu-protocol = { path = "../nu-protocol", version = "0.87.1" }
git2 = "0.18"

View File

@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu_plugin_inc"
edition = "2021"
license = "MIT"
name = "nu_plugin_inc"
version = "0.87.0"
version = "0.87.1"
[lib]
doctest = false
@ -16,7 +16,7 @@ name = "nu_plugin_inc"
bench = false
[dependencies]
nu-plugin = { path = "../nu-plugin", version = "0.87.0" }
nu-protocol = { path = "../nu-protocol", version = "0.87.0", features = ["plugin"] }
nu-plugin = { path = "../nu-plugin", version = "0.87.1" }
nu-protocol = { path = "../nu-protocol", version = "0.87.1", features = ["plugin"] }
semver = "1.0"

View File

@ -5,7 +5,7 @@ repository = "https://github.com/nushell/nushell/tree/main/crates/nu_plugin_quer
edition = "2021"
license = "MIT"
name = "nu_plugin_query"
version = "0.87.0"
version = "0.87.1"
[lib]
doctest = false
@ -16,9 +16,9 @@ name = "nu_plugin_query"
bench = false
[dependencies]
nu-plugin = { path = "../nu-plugin", version = "0.87.0" }
nu-protocol = { path = "../nu-protocol", version = "0.87.0" }
nu-engine = { path = "../nu-engine", version = "0.87.0" }
nu-plugin = { path = "../nu-plugin", version = "0.87.1" }
nu-protocol = { path = "../nu-protocol", version = "0.87.1" }
nu-engine = { path = "../nu-engine", version = "0.87.1" }
gjson = "0.8"
scraper = { default-features = false, version = "0.18" }