|
4 | 4 | " Previous Maintainer: Nikolai Weibull <[email protected]> |
5 | 5 | " Latest Revision: 2024 Sep 02 |
6 | 6 | " Recent Changes: Support for #include and #includedir. |
7 | | -" Added many new options (Samuel D. Leslie) |
8 | | -" Update allowed Tag_Spec Runas_Spec syntax items |
| 7 | +" 2018 Aug 28 by Vim project Added many new options (Samuel D. Leslie) |
| 8 | +" 2024 Sep 09 by Vim project Update allowed Tag_Spec Runas_Spec syntax items |
| 9 | +" 2026 Feb 13 by Vim project update regex for matching usernames #19396 |
9 | 10 |
|
10 | 11 | if exists("b:current_syntax") |
11 | 12 | finish |
@@ -35,28 +36,28 @@ syn keyword sudoersAlias Host_Alias nextgroup=sudoersHostAlias skip |
35 | 36 | syn keyword sudoersAlias Cmnd_Alias nextgroup=sudoersCmndAlias skipwhite skipnl |
36 | 37 |
|
37 | 38 | syn match sudoersUserAlias contained '\<\u[A-Z0-9_]*\>' nextgroup=sudoersUserAliasEquals skipwhite skipnl |
38 | | -syn match sudoersUserNameInList contained '\<\l\+\>' nextgroup=@sudoersUserList skipwhite skipnl |
| 39 | +syn match sudoersUserNameInList contained '\<\l[-a-z0-9_]*\>' nextgroup=@sudoersUserList skipwhite skipnl |
39 | 40 | syn match sudoersUIDInList contained '#\d\+\>' nextgroup=@sudoersUserList skipwhite skipnl |
40 | | -syn match sudoersGroupInList contained '%\l\+\>' nextgroup=@sudoersUserList skipwhite skipnl |
41 | | -syn match sudoersUserNetgroupInList contained '+\l\+\>' nextgroup=@sudoersUserList skipwhite skipnl |
| 41 | +syn match sudoersGroupInList contained '%\l[-a-z0-9_]*\>' nextgroup=@sudoersUserList skipwhite skipnl |
| 42 | +syn match sudoersUserNetgroupInList contained '+\l[-a-z0-9_]*\>' nextgroup=@sudoersUserList skipwhite skipnl |
42 | 43 | syn match sudoersUserAliasInList contained '\<\u[A-Z0-9_]*\>' nextgroup=@sudoersUserList skipwhite skipnl |
43 | 44 |
|
44 | | -syn match sudoersUserName contained '\<\l\+\>' nextgroup=@sudoersParameter skipwhite skipnl |
| 45 | +syn match sudoersUserName contained '\<\l[-a-z0-9_]*\>' nextgroup=@sudoersParameter skipwhite skipnl |
45 | 46 | syn match sudoersUID contained '#\d\+\>' nextgroup=@sudoersParameter skipwhite skipnl |
46 | | -syn match sudoersGroup contained '%\l\+\>' nextgroup=@sudoersParameter skipwhite skipnl |
47 | | -syn match sudoersUserNetgroup contained '+\l\+\>' nextgroup=@sudoersParameter skipwhite skipnl |
| 47 | +syn match sudoersGroup contained '%\l[-a-z0-9_]*\>' nextgroup=@sudoersParameter skipwhite skipnl |
| 48 | +syn match sudoersUserNetgroup contained '+\l[-a-z0-9_]*\>' nextgroup=@sudoersParameter skipwhite skipnl |
48 | 49 | syn match sudoersUserAliasRef contained '\<\u[A-Z0-9_]*\>' nextgroup=@sudoersParameter skipwhite skipnl |
49 | 50 |
|
50 | | -syn match sudoersUserNameInSpec contained '\<\l\+\>' nextgroup=@sudoersUserSpec skipwhite skipnl |
| 51 | +syn match sudoersUserNameInSpec contained '\<\l[-a-z0-9_]*\>' nextgroup=@sudoersUserSpec skipwhite skipnl |
51 | 52 | syn match sudoersUIDInSpec contained '#\d\+\>' nextgroup=@sudoersUserSpec skipwhite skipnl |
52 | | -syn match sudoersGroupInSpec contained '%\l\+\>' nextgroup=@sudoersUserSpec skipwhite skipnl |
53 | | -syn match sudoersUserNetgroupInSpec contained '+\l\+\>' nextgroup=@sudoersUserSpec skipwhite skipnl |
| 53 | +syn match sudoersGroupInSpec contained '%\l[-a-z0-9_]*\>' nextgroup=@sudoersUserSpec skipwhite skipnl |
| 54 | +syn match sudoersUserNetgroupInSpec contained '+\l[-a-z0-9_]*\>' nextgroup=@sudoersUserSpec skipwhite skipnl |
54 | 55 | syn match sudoersUserAliasInSpec contained '\<\u[A-Z0-9_]*\>' nextgroup=@sudoersUserSpec skipwhite skipnl |
55 | 56 |
|
56 | | -syn match sudoersUserNameInRunas contained '\<\l\+\>' nextgroup=@sudoersUserRunas skipwhite skipnl |
| 57 | +syn match sudoersUserNameInRunas contained '\<\l[-a-z0-9_]*\>' nextgroup=@sudoersUserRunas skipwhite skipnl |
57 | 58 | syn match sudoersUIDInRunas contained '#\d\+\>' nextgroup=@sudoersUserRunas skipwhite skipnl |
58 | | -syn match sudoersGroupInRunas contained '%\l\+\>' nextgroup=@sudoersUserRunas skipwhite skipnl |
59 | | -syn match sudoersUserNetgroupInRunas contained '+\l\+\>' nextgroup=@sudoersUserRunas skipwhite skipnl |
| 59 | +syn match sudoersGroupInRunas contained '%\l[-a-z0-9_]*\>' nextgroup=@sudoersUserRunas skipwhite skipnl |
| 60 | +syn match sudoersUserNetgroupInRunas contained '+\l[-a-z0-9_]*\>' nextgroup=@sudoersUserRunas skipwhite skipnl |
60 | 61 | syn match sudoersUserAliasInRunas contained '\<\u[A-Z0-9_]*\>' nextgroup=@sudoersUserRunas skipwhite skipnl |
61 | 62 |
|
62 | 63 | syn match sudoersHostAlias contained '\<\u[A-Z0-9_]*\>' nextgroup=sudoersHostAliasEquals skipwhite skipnl |
|
0 commit comments