mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 22:50:14 +02:00
make cd
, cp
, ls
, mv
, open
and rm
automatically strip ansi codes (#6220)
* make `cd`, `cp`, `ls`, `mv`, `open` and `rm` automatically strip ansi escape code * fix nu-cli test * fix nu-cli test 2 * fix nu-cli test 3 * remove `include-ansi` arg * fix test
This commit is contained in:
@ -360,3 +360,18 @@ fn does_not_error_when_some_file_is_moving_into_itself() {
|
||||
assert!(expected.exists());
|
||||
})
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn mv_ignores_ansi() {
|
||||
Playground::setup("mv_test_ansi", |_dirs, sandbox| {
|
||||
sandbox.with_files(vec![EmptyFile("test.txt")]);
|
||||
let actual = nu!(
|
||||
cwd: sandbox.cwd(),
|
||||
r#"
|
||||
ls | find test | mv $in.0.name success.txt; ls | $in.0.name
|
||||
"#
|
||||
);
|
||||
|
||||
assert_eq!(actual.out, "success.txt");
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user