You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
string commands handle multiple arguments, e.g., "string length a bb ccc dddd" return four elements 1 2 3 4.
It looks like string repeat is an exception here.
~> string repeat -n 2 a bb ccc dddd
It would be better if string repeat handles multiple arguments consistently with the other string commands.
(My motivation here is to use "string repeat -n 1 $var" as a way to return array $var. Currently one can either manually loop and echo, or use "string join \n $var", but loops are too long, and string join feels like it returns a single element, and automatic unpacking via newline split feels weird. I feel string repeat could be a good alternative to these.)
The text was updated successfully, but these errors were encountered: