From f92411380cda8a423d2fe305980b7140248da5bd Mon Sep 17 00:00:00 2001 From: Rosa Richter Date: Wed, 10 Apr 2024 10:43:36 -0600 Subject: [PATCH] Fix list usage in asdf.nu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After installing asdf.nu in my nushell config, running `asdf plugin list` gives me the following error: ❯ asdf plugin list Error: nu::shell::cannot_pass_list_to_external × Lists are not automatically spread when calling external commands ╭─[/opt/asdf-vm/asdf.nu:110:27] 109 │ 110 │ ^asdf plugin list $flags | lines | parse -r $template | str trim · ───┬── · ╰── Spread operator (...) is necessary to spread lists 111 │ } ╰──── help: Either convert the list to a string or use the spread operator, like so: ...$flags This change fixes the error. --- asdf.nu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asdf.nu b/asdf.nu index 244f64228..ad3358140 100644 --- a/asdf.nu +++ b/asdf.nu @@ -107,7 +107,7 @@ module asdf { let flags = ($params | where enabled | get --ignore-errors flag | default '' ) - ^asdf plugin list $flags | lines | parse -r $template | str trim + ^asdf plugin list ...$flags | lines | parse -r $template | str trim } # list all available plugins