add optional sigil % to start of commands#248
Conversation
|
Thanks for the update, would you please also include some new test cases? https://github.com/nushell/tree-sitter-nu/blob/main/test/corpus/pipe/commands.nu |
| ==== | ||
|
|
||
| %echo | ||
| %str join |
There was a problem hiding this comment.
This doesn't sound right to me...
Maybe we need to tune the nushell syntax a little bit, %"str join" makes more sense to me. @fdncred ideas?
There was a problem hiding this comment.
I think the way it's listed above is the right syntax. You don't call sub commands with quotes so I'm not sure why you'd need to quote it if you're using a sigil.
❯ [a b c] | str join
abc
❯ [a b c] | %str join
abcThere was a problem hiding this comment.
Yeah, good point, we can't tell whether the join here is part of the command or a command argument with or without the sigil. We chose the lsp semantic tokens feature as a workaround.
@Tyarel8 I'd suggest we remove this single line from the test, as the result is not aligned with nu-parser. That's something we can't fix at the moment.
|
Are we ready to land this now? |
Sure. |
|
Thanks |
Add the new sigil
%for builtin commands from nushell/nushell#17956