Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/gentoo-syntax:master commit in: ftdetect/, plugin/
Date: Mon, 21 Feb 2022 18:15:23
Message-Id: 1645467300.e5a55b7fa046e3b23b7f7e5e2224fa9dc74c1052.mgorny@gentoo
1 commit: e5a55b7fa046e3b23b7f7e5e2224fa9dc74c1052
2 Author: Anna “CyberTailor” <cyber <AT> sysrq <DOT> in>
3 AuthorDate: Sat Feb 19 07:40:04 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 21 18:15:00 2022 +0000
6 URL: https://gitweb.gentoo.org/proj/gentoo-syntax.git/commit/?id=e5a55b7f
7
8 ftdetect/gentoo.vim: set multiple file types
9
10 So basically Syntastic shell checks (most importantly "sh" and
11 "checkbashisms") works for init.d, conf.d and env.d files now. Yay!
12
13 Signed-off-by: Anna Vyalkova <cyber+gentoo <AT> sysrq.in>
14 Closes: https://github.com/gentoo/gentoo-syntax/pull/44
15 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
16
17 ftdetect/gentoo.vim | 8 ++++----
18 plugin/newinitd.vim | 4 ++--
19 2 files changed, 6 insertions(+), 6 deletions(-)
20
21 diff --git a/ftdetect/gentoo.vim b/ftdetect/gentoo.vim
22 index b8c14ac..b89f058 100644
23 --- a/ftdetect/gentoo.vim
24 +++ b/ftdetect/gentoo.vim
25 @@ -31,20 +31,20 @@ au BufNewFile,BufRead ChangeLog*
26
27 " /etc/init.d/ scripts
28 au BufNewFile,BufRead /etc/init.d/*
29 - \ set filetype=gentoo-init-d |
30 + \ set filetype=gentoo-init-d.sh |
31
32 au BufNewFile,BufRead *
33 \ if (getline(1) =~? "#!/sbin/\\(runscript\\|openrc-run\\)") |
34 - \ set filetype=gentoo-init-d |
35 + \ set filetype=gentoo-init-d.sh |
36 \ endif
37
38 " /etc/conf.d/ scripts
39 au BufNewFile,BufRead /etc/conf.d/*
40 - \ set filetype=gentoo-conf-d
41 + \ set filetype=gentoo-conf-d.sh
42
43 " /etc/env.d/ scripts
44 au BufNewFile,BufRead /etc/env.d/*
45 - \ set filetype=gentoo-env-d
46 + \ set filetype=gentoo-env-d.sh
47
48 " /etc/cron.d/ scripts
49 au BufNewFile,BufRead /etc/cron.d/*
50
51 diff --git a/plugin/newinitd.vim b/plugin/newinitd.vim
52 index f11dd0f..dcc2e1a 100644
53 --- a/plugin/newinitd.vim
54 +++ b/plugin/newinitd.vim
55 @@ -37,12 +37,12 @@ fun! <SID>MakeNewInitd()
56 0
57 endfun
58
59 -com! -nargs=0 NewInitd call <SID>MakeNewInitd() | set filetype=gentoo-init-d
60 +com! -nargs=0 NewInitd call <SID>MakeNewInitd() | set filetype=gentoo-init-d.sh
61
62 augroup NewInitd
63 au!
64 autocmd BufNewFile {/*/files/*.{rc*,init*},/etc/init.d/*}
65 - \ call <SID>MakeNewInitd() | set filetype=gentoo-init-d
66 + \ call <SID>MakeNewInitd() | set filetype=gentoo-init-d.sh
67 augroup END
68
69 " vim: set et foldmethod=marker : "