annotate runtime/syntax/sudoers.vim @ 2642:840c3cadb842

Updated runtime files.
author Bram Moolenaar <bram@vim.org>
date Tue, 16 Nov 2010 20:34:40 +0100
parents 82b5078be2dd
children b01a37ab556b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
39
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
1 " Vim syntax file
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
2 " Language: sudoers(5) configuration files
839
1f3b1021f002 updated for version 7.0e05
vimboss
parents: 389
diff changeset
3 " Maintainer: Nikolai Weibull <now@bitwi.se>
1621
82b5078be2dd updated for version 7.2a
vimboss
parents: 839
diff changeset
4 " Latest Revision: 2007-08-02
39
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
5
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
6 if exists("b:current_syntax")
39
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
7 finish
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
8 endif
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
9
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
10 let s:cpo_save = &cpo
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
11 set cpo&vim
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
12
39
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
13 " TODO: instead of 'skipnl', we would like to match a specific group that would
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
14 " match \\$ and then continue with the nextgroup, actually, the skipnl doesn't
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
15 " work...
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
16 " TODO: treat 'ALL' like a special (yay, a bundle of new rules!!!)
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
17
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
18 syn match sudoersUserSpec '^' nextgroup=@sudoersUserInSpec skipwhite
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
19
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
20 syn match sudoersSpecEquals contained '=' nextgroup=@sudoersCmndSpecList skipwhite
39
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
21
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
22 syn cluster sudoersCmndSpecList contains=sudoersUserRunasBegin,sudoersPASSWD,@sudoersCmndInSpec
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
23
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
24 syn keyword sudoersTodo contained TODO FIXME XXX NOTE
39
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
25
389
4fe8e1a7758e updated for version 7.0102
vimboss
parents: 375
diff changeset
26 syn region sudoersComment display oneline start='#' end='$' contains=sudoersTodo
39
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
27
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
28 syn keyword sudoersAlias User_Alias Runas_Alias nextgroup=sudoersUserAlias skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
29 syn keyword sudoersAlias Host_Alias nextgroup=sudoersHostAlias skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
30 syn keyword sudoersAlias Cmnd_Alias nextgroup=sudoersCmndAlias skipwhite skipnl
39
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
31
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
32 syn match sudoersUserAlias contained '\<\u[A-Z0-9_]*\>' nextgroup=sudoersUserAliasEquals skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
33 syn match sudoersUserNameInList contained '\<\l\+\>' nextgroup=@sudoersUserList skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
34 syn match sudoersUIDInList contained '#\d\+\>' nextgroup=@sudoersUserList skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
35 syn match sudoersGroupInList contained '%\l\+\>' nextgroup=@sudoersUserList skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
36 syn match sudoersUserNetgroupInList contained '+\l\+\>' nextgroup=@sudoersUserList skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
37 syn match sudoersUserAliasInList contained '\<\u[A-Z0-9_]*\>' nextgroup=@sudoersUserList skipwhite skipnl
39
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
38
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
39 syn match sudoersUserName contained '\<\l\+\>' nextgroup=@sudoersParameter skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
40 syn match sudoersUID contained '#\d\+\>' nextgroup=@sudoersParameter skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
41 syn match sudoersGroup contained '%\l\+\>' nextgroup=@sudoersParameter skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
42 syn match sudoersUserNetgroup contained '+\l\+\>' nextgroup=@sudoersParameter skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
43 syn match sudoersUserAliasRef contained '\<\u[A-Z0-9_]*\>' nextgroup=@sudoersParameter skipwhite skipnl
39
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
44
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
45 syn match sudoersUserNameInSpec contained '\<\l\+\>' nextgroup=@sudoersUserSpec skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
46 syn match sudoersUIDInSpec contained '#\d\+\>' nextgroup=@sudoersUserSpec skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
47 syn match sudoersGroupInSpec contained '%\l\+\>' nextgroup=@sudoersUserSpec skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
48 syn match sudoersUserNetgroupInSpec contained '+\l\+\>' nextgroup=@sudoersUserSpec skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
49 syn match sudoersUserAliasInSpec contained '\<\u[A-Z0-9_]*\>' nextgroup=@sudoersUserSpec skipwhite skipnl
39
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
50
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
51 syn match sudoersUserNameInRunas contained '\<\l\+\>' nextgroup=@sudoersUserRunas skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
52 syn match sudoersUIDInRunas contained '#\d\+\>' nextgroup=@sudoersUserRunas skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
53 syn match sudoersGroupInRunas contained '%\l\+\>' nextgroup=@sudoersUserRunas skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
54 syn match sudoersUserNetgroupInRunas contained '+\l\+\>' nextgroup=@sudoersUserRunas skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
55 syn match sudoersUserAliasInRunas contained '\<\u[A-Z0-9_]*\>' nextgroup=@sudoersUserRunas skipwhite skipnl
39
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
56
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
57 syn match sudoersHostAlias contained '\<\u[A-Z0-9_]*\>' nextgroup=sudoersHostAliasEquals skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
58 syn match sudoersHostNameInList contained '\<\l\+\>' nextgroup=@sudoersHostList skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
59 syn match sudoersIPAddrInList contained '\%(\d\{1,3}\.\)\{3}\d\{1,3}' nextgroup=@sudoersHostList skipwhite skipnl
39
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
60 syn match sudoersNetworkInList contained '\%(\d\{1,3}\.\)\{3}\d\{1,3}\%(/\%(\%(\d\{1,3}\.\)\{3}\d\{1,3}\|\d\+\)\)\=' nextgroup=@sudoersHostList skipwhite skipnl
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
61 syn match sudoersHostNetgroupInList contained '+\l\+\>' nextgroup=@sudoersHostList skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
62 syn match sudoersHostAliasInList contained '\<\u[A-Z0-9_]*\>' nextgroup=@sudoersHostList skipwhite skipnl
39
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
63
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
64 syn match sudoersHostName contained '\<\l\+\>' nextgroup=@sudoersParameter skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
65 syn match sudoersIPAddr contained '\%(\d\{1,3}\.\)\{3}\d\{1,3}' nextgroup=@sudoersParameter skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
66 syn match sudoersNetwork contained '\%(\d\{1,3}\.\)\{3}\d\{1,3}\%(/\%(\%(\d\{1,3}\.\)\{3}\d\{1,3}\|\d\+\)\)\=' nextgroup=@sudoersParameter skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
67 syn match sudoersHostNetgroup contained '+\l\+\>' nextgroup=@sudoersParameter skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
68 syn match sudoersHostAliasRef contained '\<\u[A-Z0-9_]*\>' nextgroup=@sudoersParameter skipwhite skipnl
39
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
69
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
70 syn match sudoersHostNameInSpec contained '\<\l\+\>' nextgroup=@sudoersHostSpec skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
71 syn match sudoersIPAddrInSpec contained '\%(\d\{1,3}\.\)\{3}\d\{1,3}' nextgroup=@sudoersHostSpec skipwhite skipnl
39
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
72 syn match sudoersNetworkInSpec contained '\%(\d\{1,3}\.\)\{3}\d\{1,3}\%(/\%(\%(\d\{1,3}\.\)\{3}\d\{1,3}\|\d\+\)\)\=' nextgroup=@sudoersHostSpec skipwhite skipnl
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
73 syn match sudoersHostNetgroupInSpec contained '+\l\+\>' nextgroup=@sudoersHostSpec skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
74 syn match sudoersHostAliasInSpec contained '\<\u[A-Z0-9_]*\>' nextgroup=@sudoersHostSpec skipwhite skipnl
39
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
75
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
76 syn match sudoersCmndAlias contained '\<\u[A-Z0-9_]*\>' nextgroup=sudoersCmndAliasEquals skipwhite skipnl
39
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
77 syn match sudoersCmndNameInList contained '[^[:space:],:=\\]\+\%(\\[[:space:],:=\\][^[:space:],:=\\]*\)*' nextgroup=@sudoersCmndList,sudoersCommandEmpty,sudoersCommandArgs skipwhite
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
78 syn match sudoersCmndAliasInList contained '\<\u[A-Z0-9_]*\>' nextgroup=@sudoersCmndList skipwhite skipnl
39
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
79
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
80 syn match sudoersCmndNameInSpec contained '[^[:space:],:=\\]\+\%(\\[[:space:],:=\\][^[:space:],:=\\]*\)*' nextgroup=@sudoersCmndSpec,sudoersCommandEmptyInSpec,sudoersCommandArgsInSpec skipwhite
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
81 syn match sudoersCmndAliasInSpec contained '\<\u[A-Z0-9_]*\>' nextgroup=@sudoersCmndSpec skipwhite skipnl
39
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
82
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
83 syn match sudoersUserAliasEquals contained '=' nextgroup=@sudoersUserInList skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
84 syn match sudoersUserListComma contained ',' nextgroup=@sudoersUserInList skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
85 syn match sudoersUserListColon contained ':' nextgroup=sudoersUserAlias skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
86 syn cluster sudoersUserList contains=sudoersUserListComma,sudoersUserListColon
39
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
87
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
88 syn match sudoersUserSpecComma contained ',' nextgroup=@sudoersUserInSpec skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
89 syn cluster sudoersUserSpec contains=sudoersUserSpecComma,@sudoersHostInSpec
39
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
90
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
91 syn match sudoersUserRunasBegin contained '(' nextgroup=@sudoersUserInRunas skipwhite skipnl
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
92 syn match sudoersUserRunasComma contained ',' nextgroup=@sudoersUserInRunas skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
93 syn match sudoersUserRunasEnd contained ')' nextgroup=sudoersPASSWD,@sudoersCmndInSpec skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
94 syn cluster sudoersUserRunas contains=sudoersUserRunasComma,@sudoersUserInRunas,sudoersUserRunasEnd
39
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
95
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
96
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
97 syn match sudoersHostAliasEquals contained '=' nextgroup=@sudoersHostInList skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
98 syn match sudoersHostListComma contained ',' nextgroup=@sudoersHostInList skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
99 syn match sudoersHostListColon contained ':' nextgroup=sudoersHostAlias skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
100 syn cluster sudoersHostList contains=sudoersHostListComma,sudoersHostListColon
39
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
101
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
102 syn match sudoersHostSpecComma contained ',' nextgroup=@sudoersHostInSpec skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
103 syn cluster sudoersHostSpec contains=sudoersHostSpecComma,sudoersSpecEquals
39
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
104
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
105
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
106 syn match sudoersCmndAliasEquals contained '=' nextgroup=@sudoersCmndInList skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
107 syn match sudoersCmndListComma contained ',' nextgroup=@sudoersCmndInList skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
108 syn match sudoersCmndListColon contained ':' nextgroup=sudoersCmndAlias skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
109 syn cluster sudoersCmndList contains=sudoersCmndListComma,sudoersCmndListColon
39
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
110
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
111 syn match sudoersCmndSpecComma contained ',' nextgroup=@sudoersCmndSpecList skipwhite skipnl
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
112 syn match sudoersCmndSpecColon contained ':' nextgroup=@sudoersUserInSpec skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
113 syn cluster sudoersCmndSpec contains=sudoersCmndSpecComma,sudoersCmndSpecColon
39
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
114
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
115 syn cluster sudoersUserInList contains=sudoersUserNegationInList,sudoersUserNameInList,sudoersUIDInList,sudoersGroupInList,sudoersUserNetgroupInList,sudoersUserAliasInList
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
116 syn cluster sudoersHostInList contains=sudoersHostNegationInList,sudoersHostNameInList,sudoersIPAddrInList,sudoersNetworkInList,sudoersHostNetgroupInList,sudoersHostAliasInList
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
117 syn cluster sudoersCmndInList contains=sudoersCmndNegationInList,sudoersCmndNameInList,sudoersCmndAliasInList
39
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
118
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
119 syn cluster sudoersUser contains=sudoersUserNegation,sudoersUserName,sudoersUID,sudoersGroup,sudoersUserNetgroup,sudoersUserAliasRef
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
120 syn cluster sudoersHost contains=sudoersHostNegation,sudoersHostName,sudoersIPAddr,sudoersNetwork,sudoersHostNetgroup,sudoersHostAliasRef
39
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
121
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
122 syn cluster sudoersUserInSpec contains=sudoersUserNegationInSpec,sudoersUserNameInSpec,sudoersUIDInSpec,sudoersGroupInSpec,sudoersUserNetgroupInSpec,sudoersUserAliasInSpec
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
123 syn cluster sudoersHostInSpec contains=sudoersHostNegationInSpec,sudoersHostNameInSpec,sudoersIPAddrInSpec,sudoersNetworkInSpec,sudoersHostNetgroupInSpec,sudoersHostAliasInSpec
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
124 syn cluster sudoersUserInRunas contains=sudoersUserNegationInRunas,sudoersUserNameInRunas,sudoersUIDInRunas,sudoersGroupInRunas,sudoersUserNetgroupInRunas,sudoersUserAliasInRunas
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
125 syn cluster sudoersCmndInSpec contains=sudoersCmndNegationInSpec,sudoersCmndNameInSpec,sudoersCmndAliasInSpec
39
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
126
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
127 syn match sudoersUserNegationInList contained '!\+' nextgroup=@sudoersUserInList skipwhite skipnl
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
128 syn match sudoersHostNegationInList contained '!\+' nextgroup=@sudoersHostInList skipwhite skipnl
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
129 syn match sudoersCmndNegationInList contained '!\+' nextgroup=@sudoersCmndInList skipwhite skipnl
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
130
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
131 syn match sudoersUserNegation contained '!\+' nextgroup=@sudoersUser skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
132 syn match sudoersHostNegation contained '!\+' nextgroup=@sudoersHost skipwhite skipnl
39
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
133
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
134 syn match sudoersUserNegationInSpec contained '!\+' nextgroup=@sudoersUserInSpec skipwhite skipnl
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
135 syn match sudoersHostNegationInSpec contained '!\+' nextgroup=@sudoersHostInSpec skipwhite skipnl
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
136 syn match sudoersUserNegationInRunas contained '!\+' nextgroup=@sudoersUserInRunas skipwhite skipnl
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
137 syn match sudoersCmndNegationInSpec contained '!\+' nextgroup=@sudoersCmndInSpec skipwhite skipnl
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
138
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
139 syn match sudoersCommandArgs contained '[^[:space:],:=\\]\+\%(\\[[:space:],:=\\][^[:space:],:=\\]*\)*' nextgroup=sudoersCommandArgs,@sudoersCmndList skipwhite
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
140 syn match sudoersCommandEmpty contained '""' nextgroup=@sudoersCmndList skipwhite skipnl
39
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
141
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
142 syn match sudoersCommandArgsInSpec contained '[^[:space:],:=\\]\+\%(\\[[:space:],:=\\][^[:space:],:=\\]*\)*' nextgroup=sudoersCommandArgsInSpec,@sudoersCmndSpec skipwhite
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
143 syn match sudoersCommandEmptyInSpec contained '""' nextgroup=@sudoersCmndSpec skipwhite skipnl
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
144
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
145 syn keyword sudoersDefaultEntry Defaults nextgroup=sudoersDefaultTypeAt,sudoersDefaultTypeColon,sudoersDefaultTypeGreaterThan,@sudoersParameter skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
146 syn match sudoersDefaultTypeAt contained '@' nextgroup=@sudoersHost skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
147 syn match sudoersDefaultTypeColon contained ':' nextgroup=@sudoersUser skipwhite skipnl
39
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
148 syn match sudoersDefaultTypeGreaterThan contained '>' nextgroup=@sudoersUser skipwhite skipnl
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
149
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
150 " TODO: could also deal with special characters here
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
151 syn match sudoersBooleanParameter contained '!' nextgroup=sudoersBooleanParameter skipwhite skipnl
39
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
152 syn keyword sudoersBooleanParameter contained long_opt_prompt ignore_dot mail_always mail_badpass mail_no_user mail_no_perms tty_tickets lecture authenticate root_sudo log_host log_year shell_noargs set_home always_set_home path_info preserve_groups fqdn insults requiretty env_editor rootpw runaspw targetpw set_logname stay_setuid env_reset use_loginclass nextgroup=sudoersParameterListComma skipwhite skipnl
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
153 syn keyword sudoersIntegerParameter contained passwd_tries loglinelen timestamp_timeout passwd_timeout umask nextgroup=sudoersIntegerParameterEquals skipwhite skipnl
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
154 syn keyword sudoersStringParameter contained mailsub badpass_message timestampdir timestampowner passprompt runas_default syslog_goodpri syslog_badpri editor logfile syslog mailerpath mailerflags mailto exempt_group verifypw listpw nextgroup=sudoersStringParameterEquals skipwhite skipnl
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
155 syn keyword sudoersListParameter contained env_check env_delete env_keep nextgroup=sudoersListParameterEquals skipwhite skipnl
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
156
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
157 syn match sudoersParameterListComma contained ',' nextgroup=@sudoersParameter skipwhite skipnl
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
158
1621
82b5078be2dd updated for version 7.2a
vimboss
parents: 839
diff changeset
159 syn cluster sudoersParameter contains=sudoersBooleanParameter,sudoersIntegerParameter,sudoersStringParameter,sudoersListParameter
39
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
160
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
161 syn match sudoersIntegerParameterEquals contained '[+-]\==' nextgroup=sudoersIntegerValue skipwhite skipnl
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
162 syn match sudoersStringParameterEquals contained '[+-]\==' nextgroup=sudoersStringValue skipwhite skipnl
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
163 syn match sudoersListParameterEquals contained '[+-]\==' nextgroup=sudoersListValue skipwhite skipnl
39
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
164
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
165 syn match sudoersIntegerValue contained '\d\+' nextgroup=sudoersParameterListComma skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
166 syn match sudoersStringValue contained '[^[:space:],:=\\]*\%(\\[[:space:],:=\\][^[:space:],:=\\]*\)*' nextgroup=sudoersParameterListComma skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
167 syn region sudoersStringValue contained start=+"+ skip=+\\"+ end=+"+ nextgroup=sudoersParameterListComma skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
168 syn match sudoersListValue contained '[^[:space:],:=\\]*\%(\\[[:space:],:=\\][^[:space:],:=\\]*\)*' nextgroup=sudoersParameterListComma skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
169 syn region sudoersListValue contained start=+"+ skip=+\\"+ end=+"+ nextgroup=sudoersParameterListComma skipwhite skipnl
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
170
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
171 syn match sudoersPASSWD contained '\%(NO\)\=PASSWD:' nextgroup=@sudoersCmndInSpec skipwhite
39
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
172
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
173 hi def link sudoersSpecEquals Operator
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
174 hi def link sudoersTodo Todo
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
175 hi def link sudoersComment Comment
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
176 hi def link sudoersAlias Keyword
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
177 hi def link sudoersUserAlias Identifier
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
178 hi def link sudoersUserNameInList String
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
179 hi def link sudoersUIDInList Number
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
180 hi def link sudoersGroupInList PreProc
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
181 hi def link sudoersUserNetgroupInList PreProc
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
182 hi def link sudoersUserAliasInList PreProc
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
183 hi def link sudoersUserName String
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
184 hi def link sudoersUID Number
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
185 hi def link sudoersGroup PreProc
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
186 hi def link sudoersUserNetgroup PreProc
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
187 hi def link sudoersUserAliasRef PreProc
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
188 hi def link sudoersUserNameInSpec String
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
189 hi def link sudoersUIDInSpec Number
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
190 hi def link sudoersGroupInSpec PreProc
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
191 hi def link sudoersUserNetgroupInSpec PreProc
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
192 hi def link sudoersUserAliasInSpec PreProc
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
193 hi def link sudoersUserNameInRunas String
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
194 hi def link sudoersUIDInRunas Number
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
195 hi def link sudoersGroupInRunas PreProc
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
196 hi def link sudoersUserNetgroupInRunas PreProc
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
197 hi def link sudoersUserAliasInRunas PreProc
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
198 hi def link sudoersHostAlias Identifier
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
199 hi def link sudoersHostNameInList String
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
200 hi def link sudoersIPAddrInList Number
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
201 hi def link sudoersNetworkInList Number
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
202 hi def link sudoersHostNetgroupInList PreProc
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
203 hi def link sudoersHostAliasInList PreProc
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
204 hi def link sudoersHostName String
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
205 hi def link sudoersIPAddr Number
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
206 hi def link sudoersNetwork Number
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
207 hi def link sudoersHostNetgroup PreProc
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
208 hi def link sudoersHostAliasRef PreProc
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
209 hi def link sudoersHostNameInSpec String
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
210 hi def link sudoersIPAddrInSpec Number
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
211 hi def link sudoersNetworkInSpec Number
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
212 hi def link sudoersHostNetgroupInSpec PreProc
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
213 hi def link sudoersHostAliasInSpec PreProc
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
214 hi def link sudoersCmndAlias Identifier
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
215 hi def link sudoersCmndNameInList String
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
216 hi def link sudoersCmndAliasInList PreProc
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
217 hi def link sudoersCmndNameInSpec String
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
218 hi def link sudoersCmndAliasInSpec PreProc
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
219 hi def link sudoersUserAliasEquals Operator
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
220 hi def link sudoersUserListComma Delimiter
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
221 hi def link sudoersUserListColon Delimiter
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
222 hi def link sudoersUserSpecComma Delimiter
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
223 hi def link sudoersUserRunasBegin Delimiter
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
224 hi def link sudoersUserRunasComma Delimiter
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
225 hi def link sudoersUserRunasEnd Delimiter
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
226 hi def link sudoersHostAliasEquals Operator
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
227 hi def link sudoersHostListComma Delimiter
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
228 hi def link sudoersHostListColon Delimiter
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
229 hi def link sudoersHostSpecComma Delimiter
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
230 hi def link sudoersCmndAliasEquals Operator
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
231 hi def link sudoersCmndListComma Delimiter
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
232 hi def link sudoersCmndListColon Delimiter
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
233 hi def link sudoersCmndSpecComma Delimiter
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
234 hi def link sudoersCmndSpecColon Delimiter
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
235 hi def link sudoersUserNegationInList Operator
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
236 hi def link sudoersHostNegationInList Operator
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
237 hi def link sudoersCmndNegationInList Operator
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
238 hi def link sudoersUserNegation Operator
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
239 hi def link sudoersHostNegation Operator
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
240 hi def link sudoersUserNegationInSpec Operator
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
241 hi def link sudoersHostNegationInSpec Operator
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
242 hi def link sudoersUserNegationInRunas Operator
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
243 hi def link sudoersCmndNegationInSpec Operator
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
244 hi def link sudoersCommandArgs String
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
245 hi def link sudoersCommandEmpty Special
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
246 hi def link sudoersDefaultEntry Keyword
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
247 hi def link sudoersDefaultTypeAt Special
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
248 hi def link sudoersDefaultTypeColon Special
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
249 hi def link sudoersDefaultTypeGreaterThan Special
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
250 hi def link sudoersBooleanParameter Identifier
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
251 hi def link sudoersIntegerParameter Identifier
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
252 hi def link sudoersStringParameter Identifier
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
253 hi def link sudoersListParameter Identifier
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
254 hi def link sudoersParameterListComma Delimiter
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
255 hi def link sudoersIntegerParameterEquals Operator
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
256 hi def link sudoersStringParameterEquals Operator
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
257 hi def link sudoersListParameterEquals Operator
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
258 hi def link sudoersIntegerValue Number
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
259 hi def link sudoersStringValue String
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
260 hi def link sudoersListValue String
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
261 hi def link sudoersPASSWD Special
39
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
262
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
263 let b:current_syntax = "sudoers"
410fa1a31baf updated for version 7.0023
vimboss
parents:
diff changeset
264
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
265 let &cpo = s:cpo_save
f14cbd913415 updated for version 7.0097
vimboss
parents: 39
diff changeset
266 unlet s:cpo_save