mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 05:24:56 +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:
@ -538,3 +538,24 @@ fn list_directory_contains_invalid_utf8() {
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn list_ignores_ansi() {
|
||||
Playground::setup("ls_test_ansi", |dirs, sandbox| {
|
||||
sandbox.with_files(vec![
|
||||
EmptyFile("los.txt"),
|
||||
EmptyFile("tres.txt"),
|
||||
EmptyFile("amigos.txt"),
|
||||
EmptyFile("arepas.clu"),
|
||||
]);
|
||||
|
||||
let actual = nu!(
|
||||
cwd: dirs.test(), pipeline(
|
||||
r#"
|
||||
ls | find .txt | each { ls $in.name }
|
||||
"#
|
||||
));
|
||||
|
||||
assert!(actual.err.is_empty());
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user