Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use of parse-help throws nu::parser::expected_keyword #586

Open
selfagency opened this issue Aug 31, 2023 · 2 comments
Open

use of parse-help throws nu::parser::expected_keyword #586

selfagency opened this issue Aug 31, 2023 · 2 comments

Comments

@selfagency
Copy link
Contributor

this:

use ~/Developer/nu_scripts/custom-completions/auto-generate/parse-fish.nu

throws this:

Error: nu::parser::expected_keyword

  × Expected keyword.
    ╭─[/Users/daniel/Developer/nu_scripts/custom-completions/auto-generate/parse-fish.nu:86:1]
 86 │ 
 87 │ let quote = '"' # "
    · ─┬─
    ·  ╰── expected def, const, def-env, extern, extern-wrapped, alias, use, module, export or export-env keyword
 88 │ 
    ╰────
@horasal
Copy link

horasal commented Aug 31, 2023

Could you try source prase-fish.nu?

Code containing non-function can only be used source but not use, I think?

It may be a good idea to make quote a function like

def quote [] {
    '"' # "
}

@LoicRiegel
Copy link
Contributor

source parse-fish.nu does not raise an error on my side. The error is there when using use.

I just tried quickly to replace let quote = '"' # " by const quote = '"' # " and then it worked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants