package tm-grammars

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Source file tm_grammar_ssh_config.ml

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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
let lang_id = "ssh-config"
let json = {json|{
  "displayName": "SSH Config",
  "fileTypes": [
    "ssh_config",
    ".ssh/config",
    "sshd_config"
  ],
  "name": "ssh-config",
  "patterns": [
    {
      "match": "\\b(A(cceptEnv|dd(ressFamily|KeysToAgent)|llow(AgentForwarding|Groups|StreamLocalForwarding|TcpForwarding|Users)|uth(enticationMethods|orized((Keys(Command(User)?|File)|Principals(Command(User)?|File)))))|B(anner|atchMode|ind(Address|Interface))|C(anonical(Domains|ize(FallbackLocal|Hostname|MaxDots|PermittedCNAMEs))|ertificateFile|hallengeResponseAuthentication|heckHostIP|hrootDirectory|iphers?|learAllForwardings|ientAlive(CountMax|Interval)|ompression(Level)?|onnect(Timeout|ionAttempts)|ontrolMaster|ontrolPath|ontrolPersist)|D(eny(Groups|Users)|isableForwarding|ynamicForward)|E(nableSSHKeysign|scapeChar|xitOnForwardFailure|xposeAuthInfo)|F(ingerprintHash|orceCommand|orward(Agent|X11(T(?:imeout|rusted))?))|G(atewayPorts|SSAPI(Authentication|CleanupCredentials|ClientIdentity|DelegateCredentials|KeyExchange|RenewalForcesRekey|ServerIdentity|StrictAcceptorCheck|TrustDns)|atewayPorts|lobalKnownHostsFile)|H(ashKnownHosts|ost(based(AcceptedKeyTypes|Authentication|KeyTypes|UsesNameFromPacketOnly)|Certificate|Key(A(?:gent|lgorithms|lias))?|Name))|I(dentit(iesOnly|y(Agent|File))|gnore(Rhosts|Unknown|UserKnownHosts)|nclude|PQoS)|K(bdInteractive(Authentication|Devices)|erberos(Authentication|GetAFSToken|OrLocalPasswd|TicketCleanup)|exAlgorithms)|L(istenAddress|ocal(Command|Forward)|oginGraceTime|ogLevel)|M(ACs|atch|ax(AuthTries|Sessions|Startups))|N(oHostAuthenticationForLocalhost|umberOfPasswordPrompts)|P(KCS11Provider|asswordAuthentication|ermit(EmptyPasswords|LocalCommand|Open|RootLogin|TTY|Tunnel|User(Environment|RC))|idFile|ort|referredAuthentications|rint(LastLog|Motd)|rotocol|roxy(Command|Jump|UseFdpass)|ubkey(A(?:cceptedKeyTypes|uthentication)))|R(Domain|SAAuthentication|ekeyLimit|emote(Command|Forward)|equestTTY|evoked((?:Host|)Keys)|hostsRSAAuthentication)|S(endEnv|erverAlive(CountMax|Interval)|treamLocalBind(Mask|Unlink)|trict(HostKeyChecking|Modes)|ubsystem|yslogFacility)|T(CPKeepAlive|rustedUserCAKeys|unnel(Device)?)|U(pdateHostKeys|se(BlacklistedKeys|DNS|Keychain|PAM|PrivilegedPort|r(KnownHostsFile)?))|V(erifyHostKeyDNS|ersionAddendum|isualHostKey)|X(11(DisplayOffset|Forwarding|UseLocalhost)|AuthLocation))\\b",
      "name": "keyword.other.ssh-config"
    },
    {
      "begin": "(^[\\t ]+)?(?=#)",
      "beginCaptures": {
        "1": {
          "name": "punctuation.whitespace.comment.leading.ssh-config"
        }
      },
      "end": "(?!\\G)",
      "patterns": [
        {
          "begin": "#",
          "beginCaptures": {
            "0": {
              "name": "punctuation.definition.comment.ssh-config"
            }
          },
          "end": "\\n",
          "name": "comment.line.number-sign.ssh-config"
        }
      ]
    },
    {
      "begin": "(^[\\t ]+)?(?=//)",
      "beginCaptures": {
        "1": {
          "name": "punctuation.whitespace.comment.leading.ssh-config"
        }
      },
      "end": "(?!\\G)",
      "patterns": [
        {
          "begin": "//",
          "beginCaptures": {
            "0": {
              "name": "punctuation.definition.comment.ssh-config"
            }
          },
          "end": "\\n",
          "name": "comment.line.double-slash.ssh-config"
        }
      ]
    },
    {
      "captures": {
        "1": {
          "name": "storage.type.ssh-config"
        },
        "2": {
          "name": "entity.name.section.ssh-config"
        },
        "3": {
          "name": "meta.toc-list.ssh-config"
        }
      },
      "match": "(?:^|[\\t ])(Host)\\s+((.*))$"
    },
    {
      "match": "\\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\b",
      "name": "constant.numeric.ssh-config"
    },
    {
      "match": "\\b[0-9]+\\b",
      "name": "constant.numeric.ssh-config"
    },
    {
      "match": "\\b(yes|no)\\b",
      "name": "constant.language.ssh-config"
    },
    {
      "match": "\\b[A-Z_]+\\b",
      "name": "constant.language.ssh-config"
    }
  ],
  "scopeName": "source.ssh-config"
}|json}