Skip to content

Commit f1a2ea3

Browse files
committed
chore: Fix make_docs.nu
1 parent ccbab2b commit f1a2ea3

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

make_docs.nu

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,15 @@ def plugin-paths [ nu_path?: path ] {
2727
$decorated | where exists | get path
2828
}
2929

30+
def plugin-args [plugins: list] {
31+
$plugins | each {|plugin| ['--plugins' $plugin] } | flatten
32+
}
33+
3034
# get all command names from a clean scope
3135
def command-names [] {
3236
let plugins = (plugin-paths)
33-
nu --no-config-file --plugins ...$plugins --commands $'scope commands | select name | to json'
37+
let plugin_args = (plugin-args $plugins)
38+
nu --no-config-file ...$plugin_args --commands $'scope commands | select name | to json'
3439
| from json
3540
}
3641

@@ -62,7 +67,8 @@ def make_docs [
6267
] {
6368
let $nu_path = ($nu_path | default $nu.current-exe)
6469
let plugins = (plugin-paths $nu_path)
65-
run-external $nu_path "--no-config-file" "--plugins" ...$plugins "make_docs.nu"
70+
let plugin_args = (plugin-args $plugins)
71+
run-external $nu_path "--no-config-file" ...$plugin_args "make_docs.nu"
6672
}
6773

6874
# generate the YAML frontmatter of a command

0 commit comments

Comments
 (0)