Skip to content

register does not accept true constant arguments #8208

@amtoine

Description

@amtoine

Related problem

i've got the nu_plugin_query from nushell installed in my $env.CARGO_HOME/bin/ which is ~/.local/share/cargo/bin/

i can not define a constant with the full absolute path and register from the constant

>_ const foo = "/home/amtoine/.local/share/cargo/bin/nu_plugin_query"
>_ register $foo
Error: nu::parser::registered_file_not_found

  × File not found
   ╭─[entry #14:1:1]
 1 │ register $foo
   ·          ──┬─
   ·            ╰── File not found: $foo
   ╰────
  help: registered files need to be available before your script is run

Note
see the original discussion over on Discord

Describe the solution you'd like

i would like

>_ const foo = "/home/amtoine/.local/share/cargo/bin/nu_plugin_query"
>_ register $foo

to register the plugin as just as register ~/.local/share/cargo/bin/nu_plugin_query already does 😋

Describe alternatives you've considered

No response

Additional context and details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions