Can't run `custom-completions/auro-generate` scripts
Open
Nobody has claimed this yet.
- Dominant language
- Nushell
- Stars
- 1.3k
- Forks
- 323
- Avg merge
- 2h 55m
- Merged PRs (30d)
- 3
Description
Both doesn't work for me.
For parse-fish.nu the error is following:
> source parse-fish.nu
Error: nu::shell::variable_not_found
× Variable not found
╭─[/home/mock/Downloads/nu_scripts/custom-completions/auto-generate/parse-fish.nu:6:35]
5 │ # parse every .fish file in the current directory and make a .nu completions file of it
6 │ ╭─▶ def build-completions-from-pwd [] {
7 │ │ ls *.fish | par-each { |f|
8 │ │ let out = ($f.name | str replace ".fish" ".nu")
9 │ │ print $"building nushell completions from ($f.name)"
10 │ │ build-completion $f.name $out
11 │ │ }
12 │ ├─▶ }
· ╰──── variable not found
13 │
╰────
For parse-help,nu:
> source parse-help.nu
> yay --help | parse-help | make-completion yay | save yay.nu
Error: nu::shell::eval_block_with_input
× Eval block failed with pipeline input
╭─[/home/mock/Downloads/nu_scripts/custom-completions/auto-generate/parse-help.nu:6:11]
5 │ # help format ' -s, --long <format> description '
6 │ $in | parse -r '\s\s+(?:-(?P<short>\w)[,\s]+)?(?:--(?P<long>[\w-]+))\s*(?:<(?P<format>.*)>)?\s*(?P<description>.*)?'
· ──┬──
· ╰── source value
7 │ }
╰────
Error: nu::shell::external_command
× External command failed
╭─[/home/mock/Downloads/nu_scripts/custom-completions/auto-generate/parse-help.nu:13:13]
12 │ build-string "\t--" $it.long (if ($it.short | is-empty) == false {
13 │ build-string "(-" $it.short ")"
· ──────┬─────
· ╰── Command `build-string` not found
14 │ }) (if ($it.description | is-empty) == false {
╰────
help: `build-string` is neither a Nushell built-in or a known external command
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the reported commands by sourcing custom-completions/auto-generate/parse-fish.nu and parse-help.nu. Start at the failing lines shown in each error, then verify that both scripts can be sourced and the demonstrated completion-generation pipelines run without errors.
Written by the indexing model from the issue text.
Assessment
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100