mirror of
https://github.com/nushell/nushell.git
synced 2025-08-15 12:33:14 +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:
@ -26,7 +26,7 @@ fn moves_a_column_before() {
|
||||
| rename chars
|
||||
| get chars
|
||||
| str trim
|
||||
| str collect
|
||||
| str join
|
||||
"#
|
||||
));
|
||||
|
||||
@ -59,9 +59,9 @@ fn moves_columns_before() {
|
||||
| move column99 column3 --before column2
|
||||
| rename _ chars_1 chars_2
|
||||
| select chars_2 chars_1
|
||||
| upsert new_col {|f| $f | transpose | get column1 | str trim | str collect}
|
||||
| upsert new_col {|f| $f | transpose | get column1 | str trim | str join}
|
||||
| get new_col
|
||||
| str collect
|
||||
| str join
|
||||
"#
|
||||
));
|
||||
|
||||
@ -95,9 +95,9 @@ fn moves_a_column_after() {
|
||||
| move letters and_more --before column2
|
||||
| rename _ chars_1 chars_2
|
||||
| select chars_1 chars_2
|
||||
| upsert new_col {|f| $f | transpose | get column1 | str trim | str collect}
|
||||
| upsert new_col {|f| $f | transpose | get column1 | str trim | str join}
|
||||
| get new_col
|
||||
| str collect
|
||||
| str join
|
||||
"#
|
||||
));
|
||||
|
||||
@ -130,7 +130,7 @@ fn moves_columns_after() {
|
||||
| move letters and_more --after column1
|
||||
| columns
|
||||
| select 1 2
|
||||
| str collect
|
||||
| str join
|
||||
"#
|
||||
));
|
||||
|
||||
|
Reference in New Issue
Block a user