Debian Codegraph @

runtime/queries/jjconfig/injections.scm

raw symbols SCIP
1 ((comment) @injection.content
2 (#set! injection.language "comment"))
3
4 (table
5 (bare_key) @table-name (#any-of? @table-name "templates" "template-aliases")
6 [(pair (_) ((string) @injection.content (#set! injection.language "jjtemplate"))) (comment)])
7
8 (table
9 (bare_key) @table-name (#any-of? @table-name "revsets" "revset-aliases")
10 [(pair (_) ((string) @injection.content (#set! injection.language "jjrevset"))) (comment)])
11
12 ; Injections for aliases that contain inline scripts. (see `jj util exec --help`)
13 ; This pattern currently relies on the language having the same name as its
14 ; interpreter, which is often the case (sh, bash, python, fish, nu...)
15 ; It also assumes the interpreter accepts the inline script with the "-c" flag.
16 (table
17 (bare_key) @table-name (#eq? @table-name "aliases")
18 (pair (_) (array .
19 (string) @util (#eq? @util "\"util\"") . (string) @exec (#eq? @exec "\"exec\"") . (string) @dd (#eq? @dd "\"--\"") .
20 (string) @injection.language .
21 ; There are many possibilities to combine "-c" with other short flags, but by
22 ; far the most common one should be the "-e" flag, which makes the script
23 ; return early when an error occurs.
24 (string) @dc (#any-of? @dc "\"-c\"" "\"-ce\"" "\"-ec\"") .
25 (string) @injection.content)))