diff --git a/crates/nu-command/src/path/relative_to.rs b/crates/nu-command/src/path/relative_to.rs index b7bc5dad87..3be9a12c52 100644 --- a/crates/nu-command/src/path/relative_to.rs +++ b/crates/nu-command/src/path/relative_to.rs @@ -113,6 +113,12 @@ path."# example: r"'eggs\bacon\sausage\spam' | path relative-to 'eggs\bacon\sausage'", result: Some(Value::test_string(r"spam")), }, + Example { + description: "Find a relative path that requires parent directory symbols", + example: r"'a\b\c' | path relative-to 'a\d\e'", + + result: Some(Value::test_string(r"..\..\b\c")), + }, ] }