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:
@ -324,3 +324,16 @@ fn removes_files_with_case_sensitive_glob_matches_by_default() {
|
||||
assert!(skipped_path.exists());
|
||||
})
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn remove_ignores_ansi() {
|
||||
Playground::setup("rm_test_ansi", |_dirs, sandbox| {
|
||||
sandbox.with_files(vec![EmptyFile("test.txt")]);
|
||||
|
||||
let actual = nu!(
|
||||
cwd: sandbox.cwd(),
|
||||
"ls | find test | get name | rm $in.0; ls",
|
||||
);
|
||||
assert!(actual.out.is_empty());
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user