Skip to content

Commit 348b787

Browse files
authored
add optional sigil % to start of commands (#248)
1 parent 696d257 commit 348b787

8 files changed

Lines changed: 182390 additions & 181870 deletions

File tree

grammar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1569,7 +1569,7 @@ function _command_rule(parenthesized) {
15691569
return prec.right(
15701570
seq(
15711571
choice(
1572-
field('head', seq(optional('^'), $.cmd_identifier)),
1572+
field('head', seq(optional(choice('^', '%')), $.cmd_identifier)),
15731573
field('head', seq('^', $._stringish)),
15741574
),
15751575
repeat(seq(sep, optional($._cmd_arg))),

queries/nu/highlights.scm

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,10 @@ key: (identifier) @property
305305
(#eq? @keyword "as"))
306306

307307
(command
308-
"^" @punctuation.delimiter
308+
[
309+
"^"
310+
"%"
311+
] @punctuation.delimiter
309312
head: (_) @function)
310313

311314
"where" @function.builtin

src/grammar.json

Lines changed: 22 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/node-types.json

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)