Unnamed repository; edit this file 'description' to name the repository.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
((comment) @injection.content
  (#set! injection.language "comment"))

(command
  head: ((cmd_identifier) @_cmd
    (#match? @_cmd "^\\s*(find|parse|split|str)$"))
  flag: (_
    name: (_) @_flag
    (#any-of? @_flag "r" "regex"))
  .
  arg: (_
    (string_content) @injection.content
    (#set! injection.language "regex")))

(_
  opr: [
    "=~"
    "!~"
    "like"
    "not-like"
  ]
  rhs: (_
    (string_content) @injection.content
    (#set! injection.language "regex")))

(command
  head: (_) @_cmd
  (#any-of? @_cmd "nu" "$nu.current-exe")
  flag: (_
    name: (_) @_flag
    (#any-of? @_flag "c" "e" "commands" "execute"))
  .
  arg: (_
    (string_content) @injection.content
    (#set! injection.language "nu")))

(command
  head: (cmd_identifier) @_command (#any-of? @_command "jq" "jaq")
  .
  arg: (_ (string_content) @injection.content)
  (#set! injection.language "jq")
)

(command
  head: (cmd_identifier) @_command (#eq? @_command "fish")
  flag: (short_flag "-") @_flag (#match? @_flag "^-.*c$")
  .
  arg: (_ (string_content) @injection.content)
  (#set! injection.language "fish")
)