Skip to content

Commit 894a560

Browse files
authored
Merge pull request #145 from chpock/add-shell
Add schemes for shell POSIX and shell bash
2 parents 751ba3d + fdaaac0 commit 894a560

11 files changed

+4129
-13
lines changed

CHANGELOG.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@
1515
- [csharp] recognise functions with nullable results
1616

1717
### Changed
18-
- Simplified catalog.xml.
18+
- Simplified catalog.xml.
1919
- Use new xsd schema for catalog.xml.
2020
- Common.jar rename to common.zip
2121
- reformat proto.hrc and included files; changed namespace.
2222
- Tweak visual.hrd xml CData markup
2323
- remove obsolete from visual-rgb.hrd
2424
- [groovy] add .gradle as groovy
25+
- Use the new shell-posix schema for shell scripts by default
2526

2627
### Added
2728
- New package type of base - all packed. Hrc and hrd files in one archive. Directory 'auto' not in archive.
@@ -37,6 +38,8 @@
3738
- [csharp] support C# 11 raw strings
3839
- [cpp] add support for C++11 string literals
3940
- [asm] add new registers, blocks. New masks for filenames and firstline
41+
- [shell-posix] add a new schema for POSIX shell with block structures and error checking
42+
- [shell-bash] add a new schema for bash script based on shell-posix
4043

4144
## [1.2.0] - 2021-09-12
4245

hrc/hrc/proto.hrc

+15-3
Original file line numberDiff line numberDiff line change
@@ -591,11 +591,23 @@
591591
</prototype>
592592
<prototype name="shell" group="scripts" description="sh/ksh/bash script">
593593
<location link="scripts/sh.hrc" />
594+
<firstline>/^\#(!\s*.+sh\b)/</firstline>
595+
</prototype>
596+
<prototype name="shell-posix" group="scripts" description="Shell Scripts (POSIX)">
597+
<location link="scripts/shell-posix.hrc" />
594598
<filename>/\.(sh|spec)$/i</filename>
595599
<filename>/^PKGBUILD$/i</filename>
596-
<filename>/\.(bash_|z)?profile/</filename>
597-
<filename>/\.(ba|k|z)?shrc/</filename>
598-
<firstline weight='2'>/^\#(!\s*.+sh\b)/</firstline>
600+
<filename>/\.z?profile/</filename>
601+
<filename>/\.(k|z)?shrc/</filename>
602+
<firstline weight='3'>/^\#(!\s*.+sh\b)/</firstline>
603+
</prototype>
604+
<prototype name="shell-bash" group="scripts" description="Shell Scripts (bash)">
605+
<location link="scripts/shell-bash.hrc" />
606+
<filename weight='3'>/\.sh$/i</filename>
607+
<filename weight='5'>/\.bash$/i</filename>
608+
<filename>/\.bash_profile/</filename>
609+
<filename>/\.bashrc/</filename>
610+
<firstline weight='5'>/^\#!(\s*.+bash\b)/</firstline>
599611
</prototype>
600612
<prototype name="avisynth" group="scripts" description="AviSynth">
601613
<location link="scripts/avisynth.hrc" />

0 commit comments

Comments
 (0)