You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Space required before beginning a comment after a command used for completion on an extern #8731
After upgrading to nu 0.77 (was previously using 0.76 with no issue), I found that my config.nu file was failing to parse with a "this command not found" error. Eventually I realized that one of my extern blocks provided a function to be used for completion on one of the arguments that had no space between the end of the command name and the beginning of an explanatory comment. This block was lifted straight from the docs, so either the functionality is broken or the docs need to be updated.
How to reproduce
Add the following to a file
def "funk" [] {
}
extern "x" [
arg?: string@"funk" # has a space
]
extern "y" [
arg?: string@"funk"# has no space
]
We changed the comment lexing in #8151 demanding a space or new line to support bare word strings containing foo#bar as frequently found in nix related scripts.
So this is indeed a breaking change and requires an update to our documentation. Thanks for pointing to the problematic examples!
Thanks! I think I also was not able to find things related to "comment" in the changelog, so it took me a bit to track this down. Should it have been reported in the 0.77 release?
Activity
sholderbach commentedon Apr 4, 2023
We changed the comment lexing in #8151 demanding a space or new line to support bare word strings containing
foo#baras frequently found in nix related scripts.So this is indeed a breaking change and requires an update to our documentation. Thanks for pointing to the problematic examples!
Fix the use of comments
lily-mara commentedon Apr 4, 2023
Thanks! I think I also was not able to find things related to "comment" in the changelog, so it took me a bit to track this down. Should it have been reported in the 0.77 release?
sholderbach commentedon Apr 4, 2023
Ah right! That slipped through the cracks.
Fix the use of comments (#856)
MangoIV commentedon May 21, 2023
Please excuse me @lily-mara @sholderbach, this was my fault.
weirdan commentedon Aug 16, 2024
I think this issue can be closed since it's by design and already documented.