[vim/vim] runtime(sh): Selectively suppress classes of errors (PR #20935)
Aliaksei Budavei (Vim Github Repository) <[email protected]> Mon, 03 Aug 2026 16:06:38 -0700
| Newsgroups | gmane.editors.vim.devel |
|---|---|
| Message-ID | <vim/vim/pull/[email protected]> |
----==_mimepart_6a711efe27062_c41180344631
Content-Type: text/plain; charset="UTF-8"
As a refinement upon `g:sh_no_error`, support suppression of
only certain classes of errors. Look up syntax rule names
and list them with:
```vim
let g:sh_no_error_rules = ["shCurlyError", "shParenError"]
```
You can view, comment on, or merge this pull request online at:
https://github.com/vim/vim/pull/20935
-- Commit Summary --
* runtime(sh): Do not conflate comments and function declarations in Bash
* runtime(sh): Fix shFunctionTwo and shFunctionFour definitions for Bash
* runtime(sh): Selectively suppress classes of errors
* squash! runtime(sh): Selectively suppress classes of errors
* squash! runtime(sh): Selectively suppress classes of errors
-- File Changes --
M runtime/doc/syntax.txt (15)
M runtime/syntax/sh.vim (151)
M runtime/syntax/testdir/dumps/sh_functions_bash_00.dump (10)
M runtime/syntax/testdir/dumps/sh_functions_bash_01.dump (16)
M runtime/syntax/testdir/dumps/sh_functions_bash_02.dump (20)
M runtime/syntax/testdir/dumps/sh_functions_bash_03.dump (18)
M runtime/syntax/testdir/dumps/sh_functions_bash_04.dump (26)
M runtime/syntax/testdir/dumps/sh_functions_bash_05.dump (38)
A runtime/syntax/testdir/dumps/sh_functions_bash_06.dump (20)
A runtime/syntax/testdir/dumps/sh_functions_bash_07.dump (20)
M runtime/syntax/testdir/input/sh_functions_bash.sh (37)
-- Patch Links --
https://github.com/vim/vim/pull/20935.patch
https://github.com/vim/vim/pull/20935.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/vim/vim/pull/20935
You are receiving this because you are subscribed to this thread.
Message ID: <vim/vim/pull/[email protected]>
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/vim_dev/vim/vim/pull/20935%40github.com.
----==_mimepart_6a711efe27062_c41180344631
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<p dir=3D"auto">As a refinement upon <code class=3D"notranslate">g:sh_no_er=
ror</code>, support suppression of<br>
only certain classes of errors. Look up syntax rule names<br>
and list them with:</p>
<div class=3D"highlight highlight-source-viml" dir=3D"auto"><pre class=3D"n=
otranslate"><span class=3D"pl-k">let</span> <span class=3D"pl-smi"><span cl=
ass=3D"pl-k">g:</span>sh_no_error_rules</span> <span class=3D"pl-k">=3D</sp=
an> [<span class=3D"pl-s"><span class=3D"pl-pds">"</span>shCurlyError<span =
class=3D"pl-pds">"</span></span>, <span class=3D"pl-s"><span class=3D"pl-pd=
s">"</span>shParenError<span class=3D"pl-pds">"</span></span>]</pre></div>
<hr>
<h4>You can view, comment on, or merge this pull request online at:</h4>
<p> <a href=3D'https://github.com/vim/vim/pull/20935'>https://gi=
thub.com/vim/vim/pull/20935</a></p>
<h4>Commit Summary</h4>
<ul>
<li><a href=3D"https://github.com/vim/vim/pull/20935/commits/e1739e811157=
bf15fe95e04a09128ab12037fb3d" class=3D"commit-link">e1739e8</a> runtime(sh=
): Do not conflate comments and function declarations in Bash</li>
<li><a href=3D"https://github.com/vim/vim/pull/20935/commits/7ca1fbfd9d69=
939fd46d0e42aeaadd3cae006b67" class=3D"commit-link">7ca1fbf</a> runtime(sh=
): Fix shFunctionTwo and shFunctionFour definitions for Bash</li>
<li><a href=3D"https://github.com/vim/vim/pull/20935/commits/b1636c121659=
ece705d5b876a1da3acbf2306f25" class=3D"commit-link">b1636c1</a> runtime(sh=
): Selectively suppress classes of errors</li>
<li><a href=3D"https://github.com/vim/vim/pull/20935/commits/f8b5cc7001de=
b2b2ca88e3ee902d3a24aa761bf1" class=3D"commit-link">f8b5cc7</a> squash! ru=
ntime(sh): Selectively suppress classes of errors</li>
<li><a href=3D"https://github.com/vim/vim/pull/20935/commits/4574efbb5485=
07a87e8ee66d2c43aee21be8a4f6" class=3D"commit-link">4574efb</a> squash! ru=
ntime(sh): Selectively suppress classes of errors</li>
</ul>
<h4 style=3D"display: inline-block">File Changes </h4> <p style=3D"display:=
inline-block">(<a href=3D"https://github.com/vim/vim/pull/20935/files">11&=
nbsp;files</a>)</p>
<ul>
<li>
<strong>M</strong>
<a href=3D"https://github.com/vim/vim/pull/20935/files#diff-e891ea60176=
f3f0bf0aa9bcd13c22cdb77f377ea932fe9515f5e0b16df8740da">runtime/doc/syntax.t=
xt</a>
(15)
</li>
<li>
<strong>M</strong>
<a href=3D"https://github.com/vim/vim/pull/20935/files#diff-650e28e4ad6=
a5c9241345580a7136ff18b5629f3b4910a5b5a455828bca5e517">runtime/syntax/sh.vi=
m</a>
(151)
</li>
<li>
<strong>M</strong>
<a href=3D"https://github.com/vim/vim/pull/20935/files#diff-6e3c26567c1=
78b68b9d378a34be7220c4afcdc362949cda19ea02413954627f7">runtime/syntax/testd=
ir/dumps/sh_functions_bash_00.dump</a>
(10)
</li>
<li>
<strong>M</strong>
<a href=3D"https://github.com/vim/vim/pull/20935/files#diff-20a8d0ded0c=
d5daf0060133831751844000eb8da6983e6e02dc99100280ccf9c">runtime/syntax/testd=
ir/dumps/sh_functions_bash_01.dump</a>
(16)
</li>
<li>
<strong>M</strong>
<a href=3D"https://github.com/vim/vim/pull/20935/files#diff-e65d82c5546=
e69de7d684b15198bd22477183d95ade4c0e529bd4d2c07d37d84">runtime/syntax/testd=
ir/dumps/sh_functions_bash_02.dump</a>
(20)
</li>
<li>
<strong>M</strong>
<a href=3D"https://github.com/vim/vim/pull/20935/files#diff-43f77474fe8=
558e2a1b7b400e4398b0db40b1cddf02c21a93f2a9cd63de0996f">runtime/syntax/testd=
ir/dumps/sh_functions_bash_03.dump</a>
(18)
</li>
<li>
<strong>M</strong>
<a href=3D"https://github.com/vim/vim/pull/20935/files#diff-9e81f0a2e67=
d1f210e538404786448341032ea46a30bfae308693e6a02f35d53">runtime/syntax/testd=
ir/dumps/sh_functions_bash_04.dump</a>
(26)
</li>
<li>
<strong>M</strong>
<a href=3D"https://github.com/vim/vim/pull/20935/files#diff-9ea6fc77eb3=
ce7438d949d47a48db0244e0c8e863c764f12ea36f4327d315be0">runtime/syntax/testd=
ir/dumps/sh_functions_bash_05.dump</a>
(38)
</li>
<li>
<strong>A</strong>
<a href=3D"https://github.com/vim/vim/pull/20935/files#diff-232a4dd83ce=
a523e6efe9609b5e3e08e09a082e4b2697e263f8dfddee5b3178d">runtime/syntax/testd=
ir/dumps/sh_functions_bash_06.dump</a>
(20)
</li>
<li>
<strong>A</strong>
<a href=3D"https://github.com/vim/vim/pull/20935/files#diff-42ef5333f5d=
eb7d32583ab60492ba6ad223ce66e107a597c8302091ace11681f">runtime/syntax/testd=
ir/dumps/sh_functions_bash_07.dump</a>
(20)
</li>
<li>
<strong>M</strong>
<a href=3D"https://github.com/vim/vim/pull/20935/files#diff-0731d12762e=
2b5997c721527a9efdc1b6a93d1dcf6bfb2ecac2d854d542e4c32">runtime/syntax/testd=
ir/input/sh_functions_bash.sh</a>
(37)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href=3D'https://github.com/vim/vim/pull/20935.patch'>https://githu=
b.com/vim/vim/pull/20935.patch</a></li>
<li><a href=3D'https://github.com/vim/vim/pull/20935.diff'>https://github=
.com/vim/vim/pull/20935.diff</a></li>
</ul>
<p style=3D"font-size:small;-webkit-text-size-adjust:none;color:#666;">&mda=
sh;<br />Reply to this email directly, <a href=3D"https://github.com/vim/vi=
m/pull/20935">view it on GitHub</a>, or <a href=3D"https://github.com/notif=
ications/unsubscribe-auth/ACY5DGFSVHOX52G3APNO3CT5IELH5AVCNFSNUABEKJSXA33TN=
F2G64TZHM2DAOJZG42DQMR3JFZXG5LFHM2TANJUHE3TCOJUGWQXMAQ">unsubscribe</a>.<br=
/>Triage notifications, keep track of coding agent tasks and review pull r=
equests on the go with GitHub Mobile for <a href=3D"https://github.com/noti=
fications/mobile/ios/ACY5DGDRAUEAK3OAVL5EE7L5IELH5A5CNFSNUABEM5UWIORPF5TWS5=
BNNB2WEL2QOVWGYUTFOF2WK43UF42DCOJYGY4TSMBSG6THEZLBONXW5KTTOVRHGY3SNFRGKZFFM=
V3GK3TUVJTG633UMVZF62LPOM">iOS</a> and <a href=3D"https://github.com/notifi=
cations/mobile/android/ACY5DGBCHJZ3ABOQQW3VRNL5IELH5A5CNFSNUABEM5UWIORPF5TW=
S5BNNB2WEL2QOVWGYUTFOF2WK43UF42DCOJYGY4TSMBSG6THEZLBONXW5KTTOVRHGY3SNFRGKZF=
FMV3GK3TUVZTG633UMVZF6YLOMRZG62LE">Android</a>. Download it today!
<br />You are receiving this because you are subscribed to this thread.<img=
src=3D"https://github.com/notifications/beacon/ACY5DGGYWGDQVGBOSUBJ3435IEL=
H5BFCNFSM6AAAAAC4ZPPXWGWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHQAA=
AAAEWUZQBJUZZGKYLTN5XKU43VMJZWG4TJMJSWI.gif" height=3D"1" width=3D"1" alt=
=3D"" /><span style=3D"color: transparent; font-size: 0; display: none; vis=
ibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-wid=
th: 0; max-height: 0; mso-hide: all">Message ID: <span><vim/vim/pull/209=
35</span><span>@</span><span>github</span><span>.</span><span>com></span=
></span></p>
<script type=3D"application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/vim/vim/pull/20935",
"url": "https://github.com/vim/vim/pull/20935",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>
<p></p>
-- <br />
-- <br />
You received this message from the "vim_dev" maillist.<br />
Do not top-post! Type your reply below the text you are replying to.<br />
For more information, visit <a href=3D"http://www.vim.org/maillist.php">htt=
p://www.vim.org/maillist.php</a><br />
<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;vim_dev" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:[email protected]">vim_dev+uns=
[email protected]</a>.<br />
To view this discussion visit <a href=3D"https://groups.google.com/d/msgid/=
vim_dev/vim/vim/pull/20935%40github.com?utm_medium=3Demail&utm_source=3Dfoo=
ter">https://groups.google.com/d/msgid/vim_dev/vim/vim/pull/20935%40github.=
com</a>.<br />
----==_mimepart_6a711efe27062_c41180344631--