Closed
Labels
A:parserIssues related to parsingcategory:enhancementNew feature or requestdeprecated:pr-pluginsDeprecated: use the A:plugins label instead
Milestone
Description
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 runNote
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 $footo 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
Labels
A:parserIssues related to parsingcategory:enhancementNew feature or requestdeprecated:pr-pluginsDeprecated: use the A:plugins label instead
Activity
fdncred commentedon Feb 25, 2023
After researching this and Kubouch's wisdom, it appears that
eval_constant()needs to be used inparse_register()inparse_keywords.rssimilar to the way it's used in other parsing functions in that file.allow register to accept a const argument (#8758)
Squashed commit of the following: