Skip to content

Commit edbb4b2

Browse files
argentitesharkdp
authored andcommitted
Add syntax highlighting for /etc/passwd file
1 parent 15b1676 commit edbb4b2

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
%YAML 1.2
2+
---
3+
# http://www.sublimetext.com/docs/3/syntax.html
4+
name: passwd
5+
file_extensions:
6+
- passwd
7+
scope: source.passwd
8+
9+
contexts:
10+
main:
11+
- comment: name
12+
match: ^[^:]+
13+
scope: keyword
14+
15+
- comment: password
16+
match: ":"
17+
push: password
18+
19+
password:
20+
- comment: uid
21+
match: ":"
22+
set: uid
23+
24+
- comment: shadowpassword
25+
match: "[^:]+"
26+
scope: invalid
27+
28+
uid:
29+
- comment: gid
30+
match: ":"
31+
set: gid
32+
33+
- comment: number
34+
match: "[0-9]+"
35+
scope: constant.numeric
36+
37+
gid:
38+
- comment: comment
39+
match: ":"
40+
set: comment
41+
42+
- comment: number
43+
match: "[0-9]+"
44+
scope: constant.language
45+
46+
comment:
47+
- comment: directory
48+
match: ":"
49+
set: directory
50+
51+
- comment: comment
52+
match: "[^:]+"
53+
scope: entity.name
54+
55+
directory:
56+
- comment: shell
57+
match: ":"
58+
set: shell
59+
60+
- comment: directory
61+
match: "[^:]+"
62+
scope: string.unquoted
63+
64+
shell:
65+
- comment: newline
66+
match: "\n"
67+
pop: true
68+
69+
- comment: directory
70+
match: "[^:\n]+"
71+
scope: variable.parameter

0 commit comments

Comments
 (0)