medit/moo/mooedit/language-specs/sh.lang

303 lines
10 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<language _name="sh" version="1.0" _section="Scripts"
mimetypes="text/x-shellscript;application/x-shellscript;text/x-sh"
extensions="*.sh">
<!--
Author: Silian Della Ragione (silian87@gechi.it)
Contribs: Paolo Maggi (paolo@gnome.org)
Contribs: Muntyan :-)
-->
<escape-char>\</escape-char>
<syntax-item _name="Shebang" style="Shebang">
<start-regex>^#!</start-regex>
<end-regex>\n</end-regex>
</syntax-item>
<syntax-item _name = "Line Comment 1" style = "Comment">
<start-regex>^#[^!]</start-regex>
<end-regex>\n</end-regex>
</syntax-item>
<syntax-item _name = "Line Comment 2" style = "Comment">
<start-regex>(?&lt;=.)#</start-regex>
<end-regex>\n</end-regex>
</syntax-item>
<syntax-item _name = "Line Comment 3" style = "Comment">
<start-regex>^#$</start-regex>
<end-regex>\n</end-regex>
</syntax-item>
<string _name = "Multiline String" style = "String" end-at-line-end = "FALSE">
<start-regex>&quot;&quot;&quot;</start-regex>
<end-regex>&quot;&quot;&quot;</end-regex>
</string>
<string _name = "Multiline String 2" style = "String" end-at-line-end = "FALSE">
<start-regex>&apos;&apos;&apos;</start-regex>
<end-regex>&apos;&apos;&apos;</end-regex>
</string>
<string _name = "String" style = "String" end-at-line-end = "TRUE">
<start-regex>&quot;</start-regex>
<end-regex>&quot;</end-regex>
</string>
<string _name = "String 2" style = "String" end-at-line-end = "TRUE">
<start-regex>&apos;</start-regex>
<end-regex>&apos;</end-regex>
</string>
<string _name = "Backtick String" style = "Function" end-at-line-end = "TRUE">
<start-regex>`</start-regex>
<end-regex>`</end-regex>
</string>
<pattern-item _name = "Punctuators" style = "Others">
<regex>[();\|&amp;/]</regex>
</pattern-item>
<pattern-item _name = "Functions" style = "Function">
<regex>\b[a-zA-Z_][a-zA-Z0-9_]+[ \t]*\(\)</regex>
</pattern-item>
<keyword-list _name = "Redirections" style = "Others"
case-sensitive="TRUE"
match-empty-string-at-beginning = "FALSE"
match-empty-string-at-end = "FALSE">
<keyword>&gt;&amp;+[0-9]</keyword>
<keyword>\b[0-9]+&gt;&amp;</keyword>
<keyword>\b[0-9]+&gt;&amp;+[0-9]</keyword>
<keyword>\b[0-9]+&gt;</keyword>
<keyword>&gt;&gt;</keyword>
<keyword>\b[0-9]+&gt;&gt;</keyword>
<keyword>&lt;&amp;[0-9]</keyword>
<keyword>\b[0-9]+&lt;&amp;</keyword>
<keyword>\b[0-9]+&lt;&amp;[0-9]</keyword>
<keyword>\b[0-9]+&lt;</keyword>
<keyword>&lt;&lt;+[0-9]</keyword>
<keyword>\b[0-9]+&lt;&lt;</keyword>
</keyword-list>
<keyword-list _name="Operators" style="Function"
case-sensitive="TRUE"
match-empty-string-at-beginning="FALSE"
match-empty-string-at-end="FALSE">
<keyword>\-a\b</keyword>
<keyword>\-b\b</keyword>
<keyword>\-c\b</keyword>
<keyword>\-d\b</keyword>
<keyword>\-e\b</keyword>
<keyword>\-f\b</keyword>
<keyword>\-g\b</keyword>
<keyword>\-h\b</keyword>
<keyword>\-k\b</keyword>
<keyword>\-p\b</keyword>
<keyword>\-r\b</keyword>
<keyword>\-s\b</keyword>
<keyword>\-t\b</keyword>
<keyword>\-u\b</keyword>
<keyword>\-w\b</keyword>
<keyword>\-x\b</keyword>
<keyword>\-O\b</keyword>
<keyword>\-G\b</keyword>
<keyword>\-L\b</keyword>
<keyword>\-S\b</keyword>
<keyword>\-N\b</keyword>
<keyword>\-nt\b</keyword>
<keyword>\-ot\b</keyword>
<keyword>\-ef\b</keyword>
<keyword>\-o\b</keyword>
<keyword>\-z\b</keyword>
<keyword>\-n\b</keyword>
<keyword>&lt;</keyword>
<keyword>&gt;</keyword>
<keyword>\!=</keyword>
<keyword>\-eq\b</keyword>
<keyword>\-ne\b</keyword>
<keyword>\-lt\b</keyword>
<keyword>\-le\b</keyword>
<keyword>\-gt\b</keyword>
<keyword>\-ge\b</keyword>
</keyword-list>
<keyword-list _name = "Variable1" style = "Variable"
case-sensitive="TRUE"
match-empty-string-at-beginning = "FALSE"
match-empty-string-at-end = "FALSE">
<keyword>[$]+[@?*{a-zA-Z0-9_][}a-zA-Z0-9_]*</keyword>
</keyword-list>
<keyword-list _name = "Variable2" style = "Variable"
case-sensitive="TRUE"
match-empty-string-at-beginning = "FALSE"
match-empty-string-at-end = "FALSE">
<keyword>[a-zA-Z_][a-zA-Z0-9_]*\=</keyword>
</keyword-list>
<keyword-list _name = "Built-in Commands" style = "Keyword"
case-sensitive="TRUE"
match-empty-string-at-beginning = "FALSE"
match-empty-string-at-end = "FALSE">
<keyword>\!</keyword>
<keyword>\{</keyword>
<keyword>\}</keyword>
<keyword>\bcase\b</keyword>
<keyword>\bdo\b</keyword>
<keyword>\bdone\b</keyword>
<keyword>\belif\b</keyword>
<keyword>\belse\b</keyword>
<keyword>\belse\b</keyword>
<keyword>\besac\b</keyword>
<keyword>\bfi\b</keyword>
<keyword>\bfor\b</keyword>
<keyword>\bfunction\b</keyword>
<keyword>\bif\b</keyword>
<keyword>\bin\b</keyword>
<keyword>\bselect\b</keyword>
<keyword>\bthen\b</keyword>
<keyword>\buntil\b</keyword>
<keyword>\bwhile\b</keyword>
<keyword>\bbash\b</keyword>
<keyword>\:</keyword>
<keyword>\.</keyword>
<keyword>\[</keyword>
<keyword>\]</keyword>
<keyword>[$]+\[</keyword>
<keyword>\balias\b</keyword>
<keyword>\bbg\b</keyword>
<keyword>\bbind\b</keyword>
<keyword>\bbreak\b</keyword>
<keyword>\bbuiltin\b</keyword>
<keyword>\bcd\b</keyword>
<keyword>\bcommand\b</keyword>
<keyword>\bcompgen\b</keyword>
<keyword>\bcomplete\b</keyword>
<keyword>\bcontinue\b</keyword>
<keyword>\bdeclare\b</keyword>
<keyword>\bdirs\b</keyword>
<keyword>\bdisown\b</keyword>
<keyword>\becho\b</keyword>
<keyword>\benable\b</keyword>
<keyword>\beval\b</keyword>
<keyword>\bexec\b</keyword>
<keyword>\bexit\b</keyword>
<keyword>\bexport\b</keyword>
<keyword>\bfc\b</keyword>
<keyword>\bfg\b</keyword>
<keyword>\bgetopts\b</keyword>
<keyword>\bhash\b</keyword>
<keyword>\bhelp\b</keyword>
<keyword>\bhistory\b</keyword>
<keyword>\bjobs\b</keyword>
<keyword>\bkill\b</keyword>
<keyword>\blet\b</keyword>
<keyword>\blocal\b</keyword>
<keyword>\blogout\b</keyword>
<keyword>\bpodp\b</keyword>
<keyword>\bprintf\b</keyword>
<keyword>\bpushd\b</keyword>
<keyword>\bpwd\b</keyword>
<keyword>\bread\b</keyword>
<keyword>\breadonly\b</keyword>
<keyword>\breturn\b</keyword>
<keyword>\bset\b</keyword>
<keyword>\bshift\b</keyword>
<keyword>\bshopt\b</keyword>
<keyword>\bsource\b</keyword>
<keyword>\bsuspend\b</keyword>
<keyword>\btest\b</keyword>
<keyword>\btimes\b</keyword>
<keyword>\btrap\b</keyword>
<keyword>\btype\b</keyword>
<keyword>\btypeset\b</keyword>
<keyword>\bulimit\b</keyword>
<keyword>\bumask\b</keyword>
<keyword>\bunalias\b</keyword>
<keyword>\bunset\b</keyword>
<keyword>\bwait\b</keyword>
</keyword-list>
<keyword-list _name = "Common Commands" style = "Others" case-sensitive="TRUE">
<keyword>cp</keyword>
<keyword>rm</keyword>
<keyword>mv</keyword>
<keyword>which</keyword>
<keyword>cat</keyword>
<keyword>grep</keyword>
<keyword>sed</keyword>
<keyword>awk</keyword>
<keyword>mkdir</keyword>
<keyword>rmdir</keyword>
<keyword>ls</keyword>
<keyword>ps</keyword>
<keyword>killall</keyword>
<keyword>pidof</keyword>
<keyword>diff</keyword>
<keyword>head</keyword>
<keyword>tail</keyword>
<keyword>chown</keyword>
<keyword>chmod</keyword>
<keyword>dd</keyword>
<keyword>find</keyword>
<keyword>locate</keyword>
<keyword>tar</keyword>
<keyword>gunzip</keyword>
<keyword>gzip</keyword>
<keyword>bunzip2</keyword>
<keyword>bzip2</keyword>
<keyword>zip</keyword>
<keyword>unzip</keyword>
<keyword>mount</keyword>
<keyword>umount</keyword>
<keyword>sh</keyword>
<keyword>clear</keyword>
<keyword>wget</keyword>
<keyword>date</keyword>
<keyword>dir</keyword>
<keyword>du</keyword>
<keyword>expr</keyword>
<keyword>su</keyword>
<keyword>passwd</keyword>
<keyword>man</keyword>
<keyword>info</keyword>
<keyword>id</keyword>
<keyword>ifconfig</keyword>
<keyword>gcc</keyword>
<keyword>make</keyword>
<keyword>ld</keyword>
<keyword>ln</keyword>
<keyword>lsmod</keyword>
<keyword>insmod</keyword>
<keyword>modprobe</keyword>
<keyword>less</keyword>
<keyword>more</keyword>
<keyword>patch</keyword>
<keyword>ping</keyword>
<keyword>pkg-config</keyword>
<keyword>nice</keyword>
<keyword>renice</keyword>
<keyword>file</keyword>
<keyword>sudo</keyword>
<keyword>beep</keyword>
<keyword>tempfile</keyword>
<keyword>touch</keyword>
<keyword>eject</keyword>
<keyword>uname</keyword>
<keyword>uptime</keyword>
<keyword>whoami</keyword>
<keyword>who</keyword>
<keyword>whereis</keyword>
<keyword>sleep</keyword>
<keyword>dialog</keyword>
<keyword>xdialog</keyword>
<keyword>zenity</keyword>
</keyword-list>
<styles>
<style name="Variable" default_style="Float"/>
<style name="Shebang" default_style="Comment" bold="TRUE"/>
</styles>
</language>