mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 11:55:55 +02:00
str collect
=> str join
(#6531)
* Initialize join.rs as a copy of collect.rs * Evolve StrCollect into StrJoin * Replace 'str collect' with 'str join' everywhere git ls-files | lines | par-each { |it| sed -i 's,str collect,str join,g' $it } * Deprecate 'str collect' * Revert "Deprecate 'str collect'" This reverts commit959d14203e
. * Change `str collect` help message to say that it is deprecated We cannot remove `str collect` currently (i.e. via `nu_protocol::ShellError::DeprecatedCommand` since a prominent project uses the API:b85542c31c/src/virtualenv/activation/nushell/activate.nu (L43)
This commit is contained in:
@ -69,7 +69,7 @@ mod columns {
|
||||
format!("{} | {}", table(), pipeline(r#"
|
||||
roll left
|
||||
| columns
|
||||
| str collect "-"
|
||||
| str join "-"
|
||||
"#)));
|
||||
|
||||
assert_eq!(actual.out, "origin-stars-commit_author");
|
||||
@ -82,7 +82,7 @@ mod columns {
|
||||
format!("{} | {}", table(), pipeline(r#"
|
||||
roll right --by 2
|
||||
| columns
|
||||
| str collect "-"
|
||||
| str join "-"
|
||||
"#)));
|
||||
|
||||
assert_eq!(actual.out, "origin-stars-commit_author");
|
||||
@ -97,7 +97,7 @@ mod columns {
|
||||
|
||||
let actual = nu!(
|
||||
cwd: ".",
|
||||
format!("{} | roll right --by 3 --cells-only | columns | str collect '-' ", four_bitstring)
|
||||
format!("{} | roll right --by 3 --cells-only | columns | str join '-' ", four_bitstring)
|
||||
);
|
||||
|
||||
assert_eq!(actual.out, expected_value.1);
|
||||
|
Reference in New Issue
Block a user