annotate runtime/syntax/upstart.vim @ 20084:a7952e905d40

Added tag v8.2.0597 for changeset 0da696bd735261ee52705110e666859410e61ebc
author Bram Moolenaar <Bram@vim.org>
date Sat, 18 Apr 2020 22:00:04 +0200
parents 43efa4f5a8ea
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
1 " Vim syntax file
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
2 " Language: Upstart job files
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
3 " Maintainer: Michael Biebl <biebl@debian.org>
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
4 " James Hunt <james.hunt@ubuntu.com>
3281
af1e8a1714c2 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2725
diff changeset
5 " Last Change: 2012 Jan 16
af1e8a1714c2 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2725
diff changeset
6 " License: The Vim license
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
7 " Version: 0.4
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
8 " Remark: Syntax highlighting for Upstart (init(8)) job files.
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
9 "
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
10 " It is inspired by the initng syntax file and includes sh.vim to do the
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
11 " highlighting of script blocks.
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
12
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 3281
diff changeset
13 " quit when a syntax file was already loaded
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 3281
diff changeset
14 if exists("b:current_syntax")
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
15 finish
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
16 endif
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
17
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
18 let is_bash = 1
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
19 syn include @Shell syntax/sh.vim
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
20
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
21 syn case match
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
22
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
23 " avoid need to use 'match' for most events
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
24 setlocal iskeyword+=-
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
25
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
26 syn match upstartComment /#.*$/ contains=upstartTodo
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
27 syn keyword upstartTodo TODO FIXME contained
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
28
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
29 syn region upstartString start=/"/ end=/"/ skip=/\\"/
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
30
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
31 syn region upstartScript matchgroup=upstartStatement start="script" end="end script" contains=@upstartShellCluster
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
32
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
33 syn cluster upstartShellCluster contains=@Shell
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
34
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
35 " one argument
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
36 syn keyword upstartStatement description author version instance expect
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
37 syn keyword upstartStatement pid kill normal console env exit export
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
38 syn keyword upstartStatement umask nice oom chroot chdir exec
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
39
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
40 " two arguments
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
41 syn keyword upstartStatement limit
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
42
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
43 " one or more arguments (events)
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
44 syn keyword upstartStatement emits
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
45
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
46 syn keyword upstartStatement on start stop
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
47
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
48 " flag, no parameter
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
49 syn keyword upstartStatement respawn service instance manual debug task
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
50
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
51 " prefix for exec or script
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
52 syn keyword upstartOption pre-start post-start pre-stop post-stop
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
53
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
54 " option for kill
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
55 syn keyword upstartOption timeout
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
56 " option for oom
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
57 syn keyword upstartOption never
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
58 " options for console
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
59 syn keyword upstartOption output owner
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
60 " options for expect
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
61 syn keyword upstartOption fork daemon
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
62 " options for limit
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
63 syn keyword upstartOption unlimited
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
64
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
65 " 'options' for start/stop on
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
66 syn keyword upstartOption and or
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
67
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
68 " Upstart itself and associated utilities
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
69 syn keyword upstartEvent runlevel
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
70 syn keyword upstartEvent started
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
71 syn keyword upstartEvent starting
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
72 syn keyword upstartEvent startup
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
73 syn keyword upstartEvent stopped
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
74 syn keyword upstartEvent stopping
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
75 syn keyword upstartEvent control-alt-delete
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
76 syn keyword upstartEvent keyboard-request
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
77 syn keyword upstartEvent power-status-changed
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
78
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
79 " D-Bus
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
80 syn keyword upstartEvent dbus-activation
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
81
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
82 " Display Manager (ie gdm)
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
83 syn keyword upstartEvent desktop-session-start
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
84 syn keyword upstartEvent login-session-start
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
85
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
86 " mountall
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
87 syn keyword upstartEvent all-swaps
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
88 syn keyword upstartEvent filesystem
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
89 syn keyword upstartEvent mounted
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
90 syn keyword upstartEvent mounting
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
91 syn keyword upstartEvent local-filesystems
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
92 syn keyword upstartEvent remote-filesystems
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
93 syn keyword upstartEvent virtual-filesystems
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
94
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
95 " SysV umountnfs.sh
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
96 syn keyword upstartEvent mounted-remote-filesystems
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
97
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
98 " upstart-udev-bridge and ifup/down
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
99 syn match upstartEvent /\<\i\{-1,}-device-\(added\|removed\|up\|down\)/
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
100
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
101 " upstart-socket-bridge
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
102 syn keyword upstartEvent socket
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
103
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
104 hi def link upstartComment Comment
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
105 hi def link upstartTodo Todo
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
106 hi def link upstartString String
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
107 hi def link upstartStatement Statement
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
108 hi def link upstartOption Type
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
109 hi def link upstartEvent Define
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
110
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
111 let b:current_syntax = "upstart"