forked from extern/nushell
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:
@ -267,3 +267,19 @@ fn test_open_block_command() {
|
||||
|
||||
assert_eq!(actual.out, "abcd")
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn open_ignore_ansi() {
|
||||
Playground::setup("open_test_ansi", |dirs, sandbox| {
|
||||
sandbox.with_files(vec![EmptyFile("nu.zion.txt")]);
|
||||
|
||||
let actual = nu!(
|
||||
cwd: dirs.test(), pipeline(
|
||||
r#"
|
||||
ls | find nu.zion | get 0 | get name | open $in
|
||||
"#
|
||||
));
|
||||
|
||||
assert!(actual.err.is_empty());
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user