summaryrefslogtreecommitdiffstats
path: root/misc/syntax/ebuild.syntax
blob: 96fa35f5ca53196c4e6c64f50f2eace88325f7c7 (plain)
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
# Author   : Sergei Trofimovich <slyfox@inbox.ru>
# Language : shell
# Mode     : ebuild
#
# sh.syntax is taken as base.
#
# Note     : keep in sync default and " " contexts
#
# 'sh.syntax' header:
#  #   Since I regulary update ths file, please send any comments
#  #   to:           Michelle Konzack <linux4michelle@freenet.de>
#  #   Last Update:  Thu, 01 Jun 2006 22:10:07 +0200

context default
    #.ebuild specific commands/glo vars
    # TODO: 1. split keywords by .eclass'es
    #       2. grep all exports and place here
    keyword whole AT_M4DIR brightcyan
    keyword whole BDEPEND brightcyan
    keyword whole CABAL_FEATURES brightcyan
    keyword whole CHECKREQS_DISK_BUILD brightcyan
    keyword whole CHECKREQS_DISK_USR brightcyan
    keyword whole CHECKREQS_DISK_VAR brightcyan
    keyword whole CHECKREQS_MEMORY brightcyan
    keyword whole CONFIG_CHECK brightcyan
    keyword whole DEPEND brightcyan
    keyword whole DESCRIPTION brightcyan
    keyword whole EAPI brightcyan
    keyword whole ECONF_SOURCE brightcyan
    keyword whole EDARCS_REPOSITORY brightcyan
    keyword whole EDARCS_GET_CMD brightcyan
    keyword whole EDARCS_LOCALREPO brightcyan
    keyword whole EGIT_BRANCH brightcyan
    keyword whole EGIT_PROJECT brightcyan
    keyword whole EGIT_REPO_URI brightcyan
    keyword whole EGIT_SUBMODULES brightcyan
    keyword whole EGIT_TREE brightcyan
    keyword whole ESVN_REPO_URI brightcyan
    keyword whole EXPORT_FUNCTIONS brightcyan
    keyword whole HOMEPAGE brightcyan
    keyword whole IUSE brightcyan
    keyword whole KEYWORDS brightcyan
    keyword whole LICENSE brightcyan
    keyword whole PATCHES brightcyan
    keyword whole PDEPEND brightcyan
    keyword whole PROVIDE brightcyan
    keyword whole PYTHON_COMPAT brightcyan
    keyword whole QA_AM_MAINTAINER_MODE brightcyan
    keyword whole QA_CONFIGURE_OPTIONS brightcyan
    keyword whole QA_DESKTOP_FILE brightcyan
    keyword whole QA_DT_NEEDED brightcyan
    keyword whole QA_EXECSTACK brightcyan
    keyword whole QA_FLAGS_IGNORED brightcyan
    keyword whole QA_MULTILIB_PATHS brightcyan
    keyword whole QA_PREBUILT brightcyan
    keyword whole QA_PRESTRIPPED brightcyan
    keyword whole QA_SONAME brightcyan
    keyword whole QA_TEXTRELS brightcyan
    keyword whole QA_WX_LOAD brightcyan
    keyword whole RDEPEND brightcyan
    keyword whole REQUIRED_USE brightcyan
    keyword whole RESTRICT brightcyan
    keyword whole S brightcyan
    keyword whole SITEFILE brightcyan
    keyword whole SLOT brightcyan
    keyword whole SRC_URI brightcyan
    keyword whole WANT_AUTOCONF brightcyan
    keyword whole WANT_AUTOMAKE brightcyan
    keyword DOCS brightcyan
    keyword HTML_DOCS brightcyan
    keyword LINGUAS brightcyan

    keyword whole addpredict yellow
    keyword whole best_version yellow
    keyword whole built_with_use yellow
    keyword whole check_KV yellow
    keyword whole default yellow
    keyword whole die yellow
    keyword whole diropts yellow
    keyword whole dobin yellow
    keyword whole docinto yellow
    keyword whole docompress yellow
    keyword whole doconfd yellow
    keyword whole dodir yellow
    keyword whole dodoc yellow
    keyword whole doenvd yellow
    keyword whole doexe yellow
    keyword whole dohard yellow
    keyword whole dohtml yellow
    keyword whole doinfo yellow
    keyword whole doinitd yellow
    keyword whole doins yellow
    keyword whole dolib yellow
    keyword whole dolib.a yellow
    keyword whole dolib.so yellow
    keyword whole doman yellow
    keyword whole dosbin yellow
    keyword whole dosed yellow
    keyword whole dosym yellow
    keyword whole eapply yellow
    keyword whole eapply_user yellow
    keyword whole ebegin yellow
    keyword whole econf yellow
    keyword whole eend yellow
    keyword whole eerror yellow
    keyword whole einfo yellow
    keyword whole einstall yellow
    keyword whole einstalldocs yellow
    keyword whole elog yellow
    keyword whole emake yellow
    keyword whole epatch yellow
    keyword whole epatch_user yellow
    keyword whole ewarn yellow
    keyword whole exeinto yellow
    keyword whole exeopts yellow
    keyword whole enewgroup yellow
    keyword whole enewuser yellow
    keyword whole fowners yellow
    keyword whole fperms yellow
    keyword whole has yellow
    keyword whole hasq yellow
    keyword whole has_version yellow
    keyword whole insinto yellow
    keyword whole insopts yellow
    keyword whole intltoolize yellow
    keyword whole into yellow
    keyword whole keepdir yellow
    keyword whole libopts yellow
    keyword whole newbin yellow
    keyword whole newconfd yellow
    keyword whole newdoc yellow
    keyword whole newexe yellow
    keyword whole newins yellow
    keyword whole newman yellow
    keyword whole newsbin yellow
    keyword whole newinitd yellow
    keyword whole pax-mark yellow
    keyword whole prepall yellow
    keyword whole prepalldocs yellow
    keyword whole prepallinfo yellow
    keyword whole prepallman yellow
    keyword whole unpack yellow
    keyword whole use yellow
    keyword whole usev yellow
    keyword whole usex yellow
    keyword whole use_enable yellow
    keyword whole use_with yellow
    #autotools
    keyword whole _elibtoolize yellow
    keyword whole eaclocal yellow
    keyword whole eautoconf yellow
    keyword whole eautopoint yellow
    keyword whole eautoreconf yellow
    keyword whole eautomake yellow
    #bashcomp
    keyword whole bashcomp_alias yellow
    keyword whole dobashcomp yellow
    keyword whole newbashcomp yellow
    #cvs
    keyword whole cvs_src_unpack yellow
    #darcs
    keyword whole darcs_src_unpack yellow
    #default
    keyword whole default_src_unpack yellow
    #desktop
    keyword whole doicon yellow
    keyword whole domenu yellow
    keyword whole make_desktop_entry yellow
    keyword whole make_session_desktop yellow
    keyword whole newicon yellow
    keyword whole newmenu yellow
    #elisp-common
    keyword whole elisp-compile yellow
    keyword whole elisp-install yellow
    keyword whole elisp-site-file-install yellow
    keyword whole elisp-site-regen yellow
    #flag-o-matic
    keyword whole append-cflags yellow
    keyword whole append-cxxflags yellow
    keyword whole append-flags yellow
    keyword whole append-ldflags yellow
    keyword whole append-lfs-flags yellow
    keyword whole filter-flags yellow
    keyword whole replace-flags yellow
    keyword whole strip-flags yellow
    keyword whole strip-unsupported-flags yellow
    #git-r3
    keyword whole git-r3_checkout yellow
    keyword whole git-r3_fetch yellow
    keyword whole git-r3_src_unpack yellow
    #java-ant-2
    keyword whole EANT_BUILD_TARGET yellow
    #kernel-2
    keyword whole kernel-2_src_unpack yellow
    keyword whole kernel_is yellow
    #libtool
    keyword whole elibtoolize yellow
    #mercurial
    keyword whole mercurial_src_unpack yellow
    #mozilla
    keyword whole mozconfig_annotate yellow
    keyword whole mozconfig_config yellow
    keyword whole mozconfig_final yellow
    keyword whole mozconfig_init yellow
    keyword whole mozconfig_install_prefs yellow
    keyword whole mozconfig_use_enable yellow
    keyword whole mozconfig_use_with yellow
    keyword whole moz_pkg_setup yellow
    #multilib
    keyword whole multilib_copy_sources yellow
    keyword whole multilib_env yellow
    keyword whole multilib_foreach_abi yellow
    keyword whole multilib_is_native_abi yellow
    keyword whole multilib_layout yellow
    keyword whole multilib_parallel_foreach_abi yellow
    keyword whole multilib_toolchain_setup yellow
    #ninja-utils
    keyword whole eninja yellow
    #pam
    keyword whole cleanpamd yellow
    keyword whole dopamd yellow
    keyword whole dopammod yellow
    keyword whole dopamsecurity yellow
    keyword whole newpamd yellow
    keyword whole newpammod yellow
    keyword whole newpamsecurity yellow
    keyword whole pamd_mimic yellow
    keyword whole pamd_mimic_system yellow
    #prefix
    keyword whole eprefixify yellow
    #preserve-libs
    keyword whole preserve_old_lib yellow
    keyword whole preserve_old_lib_notify yellow
    #python
    keyword whole python_copy_sources yellow
    keyword whole python_do yellow
    keyword whole python_doexe yellow
    keyword whole python_doheader yellow
    keyword whole python_domodule yellow
    keyword whole python_doscript yellow
    keyword whole python_export yellow
    keyword whole python_export_best yellow
    keyword whole python_fix_shebang yellow
    keyword whole python_foreach_impl yellow
    keyword whole python_is_python3 yellow
    keyword whole python_moduleinto yellow
    keyword whole python_newexe yellow
    keyword whole python_newscript yellow
    keyword whole python_optimize yellow
    keyword whole python_replicate_script yellow
    keyword whole python_scriptinto yellow
    keyword whole python_setup yellow
    #rpm
    keyword whole rpm_src_unpack yellow
    keyword whole rpm_unpack yellow
    #svn
    keyword whole subversion_src_unpack yellow
    #systemd
    keyword whole systemd_dotmpfilesd yellow
    keyword whole systemd_dounit yellow
    keyword whole systemd_douserunit yellow
    keyword whole systemd_enable_ntpunit yellow
    keyword whole systemd_install_serviced yellow
    keyword whole systemd_logger yellow
    keyword whole systemd_newtmpfilesd yellow
    keyword whole systemd_newunit yellow
    keyword whole systemd_reenable yellow
    keyword whole systemd_update_catalog yellow
    #toolchain-funcs
    keyword whole gen_usr_ldscript yellow
    keyword whole tc-check-openmp yellow
    keyword whole tc-enables-pie yellow
    keyword whole tc-export yellow
    keyword whole tc-export_build_env yellow
    keyword whole tc-has-openmp yellow
    keyword whole tc-has-tls yellow
    keyword whole tc-is-clang yellow
    keyword whole tc-is-cross-compiler yellow
    keyword whole tc-is-gcc yellow
    keyword whole tc-is-static-only yellow
    keyword whole tc-ld-disable-gold yellow
    #toolchain
    keyword whole toolchain_src_unpack yellow
    #unpacker
    keyword whole unpacker_src_unpack yellow
    #virtualx
    keyword whole virtx yellow
    #xdg
    keyword whole xdg_desktop_database_update yellow
    keyword whole xdg_environment_reset yellow
    keyword whole xdg_icon_cache_update yellow
    keyword whole xdg_mimeinfo_database_update yellow

    #bashism (builtin extended 'test')
    keyword whole [[ brightcyan
    keyword whole ]] brightcyan

    #common Makefile variables
    keyword whole AR cyan
    keyword whole AS cyan
    keyword whole BINDIR cyan
    keyword whole CC cyan
    keyword whole CFLAGS cyan
    keyword whole CPPFLAGS cyan
    keyword whole CXX cyan
    keyword whole CXXFLAGS cyan
    keyword whole DESTDIR cyan
    keyword whole DOCDIR cyan
    keyword whole LD cyan
    keyword whole LDFLAGS cyan
    keyword whole LIBDIR cyan
    keyword whole MANDIR cyan
    keyword whole NM cyan
    keyword whole OBJCOPY cyan
    keyword whole PKG_CONFIG cyan
    keyword whole PREFIX cyan
    keyword whole RANLIB cyan
    keyword whole SBINDIR cyan
    keyword whole SHELL cyan
    keyword whole STRIP cyan
    keyword whole SYSCONFDIR cyan
    keyword whole YACC cyan

####################
# here starts original sh.syntax (with core commands only)
####################

    keyword ! brightred
    keyword ;; brightred
    keyword \\@ brightred
    keyword \\$ brightred
    keyword \\\\ brightred
    keyword \\" brightred
    keyword \\' brightred
    keyword \\` brightred
    keyword ` brightred
    keyword ; brightcyan
    keyword $(*) brightgreen
    keyword ${*} brightgreen
    keyword { brightcyan
    keyword } brightcyan

    keyword whole linestart #!\[\s\]*\n brightcyan black

    keyword $\* brightred
    keyword $@ brightred
    keyword $# brightred
    keyword $? brightred
    keyword $- brightred
    keyword $$ brightred
    keyword $! brightred
    keyword $_ brightred

    keyword whole 2>&1 brightred
    keyword whole 1>&2 brightred
    keyword whole 2> brightred
    keyword whole 1> brightred

    keyword wholeright $\[0123456789\] brightred

    keyword wholeright $+ brightgreen

    keyword $ brightgreen

    keyword wholeleft linestart function*() brightmagenta
    keyword wholeleft linestart function\[\s\]+ brightmagenta
    keyword wholeright +() brightmagenta

wholechars abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._

    keyword whole break yellow
    keyword whole case yellow
    keyword whole clear yellow
    keyword whole continue yellow
    keyword whole declare yellow
    keyword whole done yellow
    keyword whole do yellow
    keyword whole elif yellow
    keyword whole else yellow
    keyword whole esac yellow
    keyword whole exit yellow
    keyword whole export yellow
    keyword whole fi yellow
    keyword whole for yellow
    keyword whole getopts yellow
    keyword whole if yellow
    keyword whole in yellow
    keyword whole local yellow
    keyword whole read yellow
    keyword whole return yellow
    keyword whole select yellow
    keyword whole shift yellow
    keyword whole source yellow
    keyword whole then yellow
    keyword whole trap yellow
    keyword whole until yellow
    keyword whole unset yellow
    keyword whole wait yellow
    keyword whole while yellow

# here goes usable subset for .ebuild commands
    keyword whole awk cyan
    keyword whole cd cyan
    keyword whole chown cyan
    keyword whole chmod cyan
    keyword whole cmake cyan
    keyword whole cp cyan
    keyword whole echo cyan
    keyword whole egrep cyan
    keyword whole fgrep cyan
    keyword whole find cyan
    keyword whole grep cyan
    keyword whole ln cyan
    keyword whole make cyan
    keyword whole mkdir cyan
    keyword whole mknod cyan
    keyword whole mv cyan
    keyword whole perl cyan
    keyword whole pod2man cyan
    keyword whole popd cyan
    keyword whole printf cyan
    keyword whole pushd cyan
    keyword whole rm cyan
    keyword whole rmdir cyan
    keyword whole sed cyan
    keyword whole sh cyan
    keyword whole shopt cyan
    keyword whole touch cyan
    keyword whole xmkmf cyan

# some interesting files to copy
    keyword whole ANNOUNCEMENT white
    keyword whole AUTHORS white
    keyword whole BUGS white
    keyword whole CHANGES white
    keyword whole COPYING white
    keyword whole COPYRIGHT white
    keyword whole CREDITS white
    keyword whole ChangeLog white
    keyword whole FAQ white
    keyword whole HACKING white
    keyword whole INSTALL white
    keyword whole LICENSE white
    keyword whole NEWS white
    keyword whole README white
    keyword whole THANKS white
    keyword whole TODO white
    keyword whole VERSION white

    keyword whole /dev/audio brightblue
    keyword whole /dev/dsp brightblue
    keyword whole /dev/null brightblue
    keyword whole /dev/mixed brightblue
    keyword whole /dev/stdin brightblue
    keyword whole /dev/stdout brightblue
    keyword whole /dev/stderr brightblue
    keyword whole /dev/zero brightblue

wholechars abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_

context # \n brown
    spellcheck

context exclusive whole <<\[\s\]\[-\]\[\s\]\[\\\]EOF EOF green
context exclusive whole <<\[\s\]\[-\]\[\s\]\[\\\]END END green

context ' ' green

context " " green
    keyword \\* brightgreen
    keyword \\@ brightgreen
    keyword \\$ brightgreen
    keyword \\\\ brightgreen
    keyword \\` brightgreen
    keyword \\" brightgreen
    keyword $(*) brightgreen
    keyword ${*} brightgreen
    keyword $\* brightred
    keyword $@ brightred
    keyword $# brightred
    keyword $? brightred
    keyword $- brightred
    keyword $$ brightred
    keyword $! brightred
    keyword $_ brightred
    keyword wholeright $\[0123456789\] brightred

    keyword wholeright $+ brightgreen

    keyword $ brightgreen

context exclusive ` ` lightgray black
    keyword '*' green
    keyword " green
    keyword \\` green
    keyword ; brightcyan
    keyword $(*) brightgreen
    keyword ${*} brightgreen
    keyword { brightcyan
    keyword } brightcyan

    keyword $\* brightred
    keyword $@ brightred
    keyword $# brightred
    keyword $? brightred
    keyword $- brightred
    keyword $$ brightred
    keyword $! brightred
    keyword $_ brightred

    keyword whole 2>&1 brightred
    keyword whole 2> brightred
    keyword whole 1> brightred

    keyword wholeright $\[0123456789\] brightred

    keyword wholeright $+ brightgreen

    keyword $ brightgreen

wholechars abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._

    keyword whole break yellow
    keyword whole case yellow
    keyword whole clear yellow
    keyword whole continue yellow
    keyword whole declare yellow
    keyword whole done yellow
    keyword whole do yellow
    keyword whole elif yellow
    keyword whole else yellow
    keyword whole esac yellow
    keyword whole exit yellow
    keyword whole export yellow
    keyword whole fi yellow
    keyword whole for yellow
    keyword whole getopts yellow
    keyword whole if yellow
    keyword whole in yellow
    keyword whole read yellow
    keyword whole return yellow
    keyword whole select yellow
    keyword whole shift yellow
    keyword whole source yellow
    keyword whole then yellow
    keyword whole trap yellow
    keyword whole until yellow
    keyword whole unset yellow
    keyword whole wait yellow
    keyword whole while yellow

# here goes usable subset for .ebuild commands
    keyword whole awk cyan
    keyword whole sed cyan

    keyword whole /dev/audio brightblue
    keyword whole /dev/dsp brightblue
    keyword whole /dev/null brightblue
    keyword whole /dev/mixed brightblue
    keyword whole /dev/stdin brightblue
    keyword whole /dev/stdout brightblue
    keyword whole /dev/stderr brightblue
    keyword whole /dev/zero brightblue

context inherit \n magenta
    keyword whole inherit yellow