Porting 'ansi' command from nushell to engine-q (#494)

* Porting 'ansi' command from nushell to engine-q

* Added StrCollect to example_test.rs to allow example tests to run

* Run 'cargo fmt' to fix formatting

* Update command.rs

* Update command.rs

* Update command.rs

* Added a category

Co-authored-by: JT <547158+jntrnr@users.noreply.github.com>
This commit is contained in:
Matthew Auld
2021-12-15 18:06:35 -05:00
committed by GitHub
parent 1d74d9c5ae
commit e289630920
5 changed files with 363 additions and 1 deletions

View File

@ -7,7 +7,7 @@ use nu_protocol::{
use crate::To;
use super::{Date, From, Into, Math, Path, Random, Split, Str, Url};
use super::{Date, From, Into, Math, Path, Random, Split, Str, StrCollect, Url};
pub fn test_examples(cmd: impl Command + 'static) {
let examples = cmd.examples();
@ -27,6 +27,7 @@ pub fn test_examples(cmd: impl Command + 'static) {
working_set.add_decl(Box::new(Path));
working_set.add_decl(Box::new(Date));
working_set.add_decl(Box::new(Url));
working_set.add_decl(Box::new(StrCollect));
use super::Echo;
working_set.add_decl(Box::new(Echo));