2 lines
19 KiB
JavaScript
Raw Normal View History

2025-09-05 14:59:21 +08:00
const e=Object.freeze(JSON.parse(`{"displayName":"nushell","name":"nushell","patterns":[{"include":"#define-variable"},{"include":"#define-alias"},{"include":"#function"},{"include":"#extern"},{"include":"#module"},{"include":"#use-module"},{"include":"#expression"},{"include":"#comment"}],"repository":{"binary":{"begin":"\\\\b(0x)(\\\\[)","beginCaptures":{"1":{"name":"constant.numeric.nushell"},"2":{"name":"meta.brace.square.begin.nushell"}},"end":"\\\\]","endCaptures":{"0":{"name":"meta.brace.square.begin.nushell"}},"name":"constant.binary.nushell","patterns":[{"match":"[0-9a-fA-F]{2}","name":"constant.numeric.nushell"}]},"braced-expression":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.block.begin.bracket.curly.nushell"}},"end":"\\\\}","endCaptures":{"0":{"name":"punctuation.section.block.end.bracket.curly.nushell"}},"name":"meta.expression.braced.nushell","patterns":[{"begin":"(?<=\\\\{)\\\\s*\\\\|","end":"\\\\|","name":"meta.closure.parameters.nushell","patterns":[{"include":"#function-parameter"}]},{"captures":{"1":{"name":"variable.other.nushell"},"2":{"name":"keyword.control.nushell"}},"match":"(\\\\w+)\\\\s*(:)\\\\s*"},{"captures":{"1":{"name":"variable.other.nushell"},"2":{"name":"variable.other.nushell","patterns":[{"include":"#paren-expression"}]},"3":{"name":"keyword.control.nushell"}},"match":"(\\\\$\\"((?:[^\\"\\\\\\\\]|\\\\\\\\.)*)\\")\\\\s*(:)\\\\s*","name":"meta.record-entry.nushell"},{"captures":{"1":{"name":"variable.other.nushell"},"2":{"name":"keyword.control.nushell"}},"match":"(\\"(?:[^\\"\\\\\\\\]|\\\\\\\\.)*\\")\\\\s*(:)\\\\s*","name":"meta.record-entry.nushell"},{"captures":{"1":{"name":"variable.other.nushell"},"2":{"name":"variable.other.nushell","patterns":[{"include":"#paren-expression"}]},"3":{"name":"keyword.control.nushell"}},"match":"(\\\\$'([^']*)')\\\\s*(:)\\\\s*","name":"meta.record-entry.nushell"},{"captures":{"1":{"name":"variable.other.nushell"},"2":{"name":"keyword.control.nushell"}},"match":"('[^']*')\\\\s*(:)\\\\s*","name":"meta.record-entry.nushell"},{"include":"#spread"},{"include":"source.nushell"}]},"command":{"begin":"(?<!\\\\w)(?:(\\\\^)|(?!\\\\d|\\\\$))([\\\\w.!]+(?:(?: (?!-)[\\\\w\\\\-.!]+(?:(?= |\\\\))|$)|[\\\\w\\\\-.!]+))*|(?<=\\\\^)\\\\$?(?:\\"[^\\"]+\\"|'[^']+'))","beginCaptures":{"1":{"name":"keyword.operator.nushell"},"2":{"patterns":[{"include":"#control-keywords"},{"captures":{"0":{"name":"keyword.other.builtin.nushell"}},"match":"(?:ansi|char) \\\\w+"},{"captures":{"1":{"name":"keyword.other.builtin.nushell"},"2":{"patterns":[{"include":"#value"}]}},"comment":"Regex generated with list-to-tree (https://github.com/glcraft/list-to-tree)","match":"(a(?:l(?:ias|l)|n(?:si(?: (?:gradient|link|strip))?|y)|ppend|st)|b(?:g|its(?: (?:and|not|or|ro(?:l|r)|sh(?:l|r)|xor))?|reak|ytes(?: (?:a(?:dd|t)|build|collect|ends-with|index-of|length|re(?:move|place|verse)|starts-with))?)|c(?:al|d|h(?:ar|unks)|lear|o(?:l(?:lect|umns)|m(?:mandline(?: (?:edit|get-cursor|set-cursor))?|p(?:act|lete))|n(?:fig(?: (?:env|nu|reset))?|st|tinue))|p)|d(?:ate(?: (?:format|humanize|list-timezone|now|to-(?:record|t(?:able|imezone))))?|e(?:bug(?: (?:info|profile))?|code(?: (?:base(?:32(?:hex)?|64)|hex|new-base64))?|f(?:ault)?|scribe|tect columns)|o|rop(?: (?:column|nth))?|t(?: (?:add|diff|format|now|part|to|utcnow))?|u)|e(?:ach(?: while)?|cho|moji|n(?:code(?: (?:base(?:32(?:hex)?|64)|hex|new-base64))?|umerate)|rror make|very|x(?:ec|it|p(?:l(?:ain|ore)|ort(?: (?:alias|const|def|extern|module|use)|-env)?)|tern))|f(?:i(?:l(?:e|l|ter)|nd|rst)|latten|mt|or(?:mat(?: (?:d(?:ate|uration)|filesize|pattern))?)?|rom(?: (?:csv|eml|i(?:cs|ni)|json|msgpack(?:z)?|nuon|ods|p(?:arquet|list)|ssv|t(?:oml|sv)|url|vcf|x(?:lsx|ml)|y(?:aml|ml)))?)|g(?:e(?:nerate|t)|lob|r(?:id|oup(?:-by)?)|stat)|h(?:ash(?: (?:md5|sha256))?|e(?:aders|lp(?: (?:aliases|commands|e(?:scapes|xterns)|modules|operators))?)|i(?:de(?:-env)?|sto(?:gram|ry(?: session)?))|ttp(?: (?:delete|get|head|options|p(?:atch|ost|ut)))?)|i(?:f|gnore|n(?:c|put(?: list(?:en)?)?|s(?:ert|pect)|t(?:erleave|o(?: (?:b(?:i(?:nary|ts)|ool)|cell-path|d(