Skip to content

Commit

Permalink
fix: Fix make_docs.nu for Nu v0.93.0 (#1389)
Browse files Browse the repository at this point in the history
  • Loading branch information
hustcer committed May 5, 2024
1 parent d0bdc1d commit 381fd8a
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions make_docs.nu
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
# get all command names from a clean scope
def command-names [] {
const plugins = [
const PLUGINS = [
nu_plugin_inc,
nu_plugin_gstat,
nu_plugin_query,
nu_plugin_polars,
nu_plugin_formats,
]
let nu_dir = (which nu) | get path.0 | path dirname
mut register_cmd = ''
for plugin in $plugins {
mut plugins = []
for plugin in $PLUGINS {
if (sys).host.name == 'Windows' {
$register_cmd += $'register ($nu_dir | path join $plugin).exe;'
$plugins ++= $'($nu_dir | path join $plugin).exe'
} else {
$register_cmd += $'register ($nu_dir | path join $plugin);'
$plugins ++= $'($nu_dir | path join $plugin)'
}
}
nu --no-config-file --commands $'($register_cmd) scope commands | select name | to json'
nu --no-config-file --plugins ($plugins | to nuon) --commands $'scope commands | select name | to json'
| from json
}

Expand Down

0 comments on commit 381fd8a

Please sign in to comment.