mirror of
https://github.com/nushell/nushell.git
synced 2025-08-16 09:08:30 +02:00
Fixes .
expanded incorrectly as external argument (#12950)
This PR fixes a bug where `.` is expanded into an empty string when used as an argument to external commands. Fixes https://github.com/nushell/nushell/issues/12948. --------- Co-authored-by: Ian Manske <ian.manske@pm.me>
This commit is contained in:
@ -61,6 +61,13 @@ fn automatically_change_directory_with_trailing_slash_and_same_name_as_command()
|
||||
})
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn pass_dot_as_external_arguments() {
|
||||
let actual = nu!("nu --testbin cococo .");
|
||||
|
||||
assert_eq!(actual.out, ".");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn correctly_escape_external_arguments() {
|
||||
let actual = nu!("^nu --testbin cococo '$0'");
|
||||
|
Reference in New Issue
Block a user