nu_scripts icon indicating copy to clipboard operation
nu_scripts copied to clipboard

Auto-generated tar.nu has a syntax error

Open RReverser opened this issue 2 years ago • 5 comments

Error: nu::parser::parse_mismatch (link)

  × Parse mismatch during operation.
    ╭─[C:\Users\me\Documents\nu_scripts\custom-completions\auto-generate\completions\tar.nu:10:1]
 10 │   --get(-x)                                       # Extract from archive
 11 │   --help(-\?)                                     # Display short option summary
    ·  ─────┬─────
    ·       ╰── expected short flag
 12 │   --usage                                 # List available options
    ╰────

RReverser avatar Jun 23 '22 16:06 RReverser

ya, i don't think \? is a thing in nushell. prs welcome of course.

fdncred avatar Jun 23 '22 17:06 fdncred

Perhaps it's worth automatically checking generated .nu files for validity, and automatically removing the invalid ones from the repo for now?

RReverser avatar Jun 23 '22 17:06 RReverser

that would be nice but we don't have a clippy or fmt checker for nushell. all we have now is nu-highlight. we might just change the auto-gen script to handle ? correctly, whatever "correctly" is.

fdncred avatar Jun 23 '22 17:06 fdncred

Hm. Wouldn't it be possible to literally launch another instance of nu just with the use ...generated module... and check the exit code?

RReverser avatar Jun 23 '22 21:06 RReverser

I'm not sure. I've seen that running nu inside of nu sometimes can give weird results. Maybe that's been fixed? There is a pr now for nu-check which I just saw this morning. Maybe that'll land soon.

fdncred avatar Jun 24 '22 11:06 fdncred

Hi! This was fixed in #783 and later exported in #815 I think this can be closed

AucaCoyan avatar Apr 21 '24 14:04 AucaCoyan