mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 10:45:41 +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:
@ -13,7 +13,7 @@ def create_left_prompt [] {
|
||||
def create_right_prompt [] {
|
||||
let time_segment = ([
|
||||
(date now | date format '%m/%d/%Y %r')
|
||||
] | str collect)
|
||||
] | str join)
|
||||
|
||||
$time_segment
|
||||
}
|
||||
@ -36,11 +36,11 @@ let-env PROMPT_MULTILINE_INDICATOR = { "::: " }
|
||||
let-env ENV_CONVERSIONS = {
|
||||
"PATH": {
|
||||
from_string: { |s| $s | split row (char esep) | path expand -n }
|
||||
to_string: { |v| $v | path expand -n | str collect (char esep) }
|
||||
to_string: { |v| $v | path expand -n | str join (char esep) }
|
||||
}
|
||||
"Path": {
|
||||
from_string: { |s| $s | split row (char esep) | path expand -n }
|
||||
to_string: { |v| $v | path expand -n | str collect (char esep) }
|
||||
to_string: { |v| $v | path expand -n | str join (char esep) }
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user