Changeset View
Changeset View
Standalone View
Standalone View
data/syntax/zsh.xml
1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
---|---|---|---|---|---|
2 | <!DOCTYPE language SYSTEM "language.dtd" | 2 | <!DOCTYPE language SYSTEM "language.dtd" | ||
3 | [ | 3 | [ | ||
4 | <!ENTITY funcname "[A-Za-z_:][A-Za-z0-9_:#%@-]*"> | 4 | <!ENTITY funcname "[A-Za-z_:][A-Za-z0-9_:#%@-]*"> | ||
5 | <!ENTITY varname "[A-Za-z_][A-Za-z0-9_]*"> | 5 | <!ENTITY varname "[A-Za-z_][A-Za-z0-9_]*"> | ||
6 | <!ENTITY word "[^|&;()<>\s]+"> <!-- see man bash --> | 6 | <!ENTITY word "[^|&;()<>\s]+"> <!-- see man bash --> | ||
7 | <!ENTITY eos "(?=($|\s))"> <!-- eol or space following --> | 7 | <!ENTITY eos "(?=($|\s))"> <!-- eol or space following --> | ||
8 | <!ENTITY noword "(?![\w$+-])"> <!-- no word, $, + or - following --> | 8 | <!ENTITY noword "(?![\w$+-])"> <!-- no word, $, + or - following --> | ||
9 | <!ENTITY pathpart "([\w_@.%*?+-]|\\ )"> <!-- valid character in a file name --> | 9 | <!ENTITY pathpart "([\w_@.%*?+-]|\\ )"> <!-- valid character in a file name --> | ||
10 | ]> | 10 | ]> | ||
11 | <language name="Zsh" version="2" kateversion="2.4" section="Scripts" extensions="*.sh;*.zsh;.zshrc;.zprofile;.zlogin;.zlogout;.profile" mimetype="application/x-shellscript" casesensitive="1" author="Jonathan Kolberg (bulldog98@kubuntu-de.org)" license="LGPL"> | 11 | <language name="Zsh" version="3" kateversion="2.4" section="Scripts" extensions="*.sh;*.zsh;.zshrc;.zprofile;.zlogin;.zlogout;.profile" mimetype="application/x-shellscript" casesensitive="1" author="Jonathan Kolberg (bulldog98@kubuntu-de.org)" license="LGPL"> | ||
dhaumann: Please increase kateversion="5.0". | |||||
12 | 12 | | |||
13 | <!-- (c) 2011 by Jonathan Kolberg (bulldog98@kubuntu-de.org) | 13 | <!-- (c) 2011 by Jonathan Kolberg (bulldog98@kubuntu-de.org) | ||
14 | modified for zsh --> | 14 | modified for zsh --> | ||
15 | <!-- (c) 2004 by Wilbert Berendsen (wilbert@kde.nl) | 15 | <!-- (c) 2004 by Wilbert Berendsen (wilbert@kde.nl) | ||
16 | Changes by Matthew Woehlke (mw_triad@users.sourceforge.net) | 16 | Changes by Matthew Woehlke (mw_triad@users.sourceforge.net) | ||
17 | Changes by Sebastian Pipping (webmaster@hartwork.org) | 17 | Changes by Sebastian Pipping (webmaster@hartwork.org) | ||
18 | Released under the LGPL, part of kdelibs/kate --> | 18 | Released under the LGPL, part of kdelibs/kate --> | ||
19 | 19 | | |||
▲ Show 20 Lines • Show All 573 Lines • ▼ Show 20 Line(s) | 562 | <context attribute="Normal Text" lineEndContext="#stay" name="FindCommands"> | |||
593 | <RegExpr attribute="Builtin" context="#stay" String="\.(?=\s)" /> | 593 | <RegExpr attribute="Builtin" context="#stay" String="\.(?=\s)" /> | ||
594 | <keyword attribute="Builtin" context="#stay" String="builtins" /> | 594 | <keyword attribute="Builtin" context="#stay" String="builtins" /> | ||
595 | <keyword attribute="Command" context="#stay" String="unixcommands" /> | 595 | <keyword attribute="Command" context="#stay" String="unixcommands" /> | ||
596 | <!-- handle commands that have variable names as argument --> | 596 | <!-- handle commands that have variable names as argument --> | ||
597 | <keyword attribute="Builtin" context="VarName" String="builtins_var" /> | 597 | <keyword attribute="Builtin" context="VarName" String="builtins_var" /> | ||
598 | <!-- handle here-string --> | 598 | <!-- handle here-string --> | ||
599 | <RegExpr attribute="Redirection" context="#stay" String="\d*<<<" /> | 599 | <RegExpr attribute="Redirection" context="#stay" String="\d*<<<" /> | ||
600 | <!-- handle here document --> | 600 | <!-- handle here document --> | ||
601 | <StringDetect attribute="Redirection" context="HereDoc" String="<<" lookAhead="true" /> | 601 | <Detect2Chars attribute="Redirection" context="HereDoc" char="<" char1="<" lookAhead="true" /> | ||
602 | <!-- handle process subst --> | 602 | <!-- handle process subst --> | ||
603 | <RegExpr attribute="Redirection" context="ProcessSubst" String="[<>]\(" /> | 603 | <RegExpr attribute="Redirection" context="ProcessSubst" String="[<>]\(" /> | ||
604 | <!-- handle redirection --> | 604 | <!-- handle redirection --> | ||
605 | <RegExpr attribute="Redirection" context="#stay" String="([0-9]*(>{1,2}|<)(&[0-9]+-?)?|&>|>&|[0-9]*<>)" /> | 605 | <RegExpr attribute="Redirection" context="#stay" String="([0-9]*(>{1,2}|<)(&[0-9]+-?)?|&>|>&|[0-9]*<>)" /> | ||
606 | <!-- handle &, &&, | and || --> | 606 | <!-- handle &, &&, | and || --> | ||
607 | <RegExpr attribute="Control" context="#stay" String="([|&])\1?" /> | 607 | <RegExpr attribute="Control" context="#stay" String="([|&])\1?" /> | ||
608 | <!-- mark function definitions without function keyword --> | 608 | <!-- mark function definitions without function keyword --> | ||
609 | <RegExpr attribute="Function" context="#stay" String="&funcname;\s*\(\)" /> | 609 | <RegExpr attribute="Function" context="#stay" String="&funcname;\s*\(\)" /> | ||
Show All 27 Lines | 634 | <context attribute="Normal Text" lineEndContext="#stay" name="FindSubstitutions"> | |||
637 | <RegExpr attribute="Variable" context="#stay" String="\$[*@#?$!_0-9-]" /> | 637 | <RegExpr attribute="Variable" context="#stay" String="\$[*@#?$!_0-9-]" /> | ||
638 | <RegExpr attribute="Variable" context="#stay" String="\$\{[*@#?$!_0-9-]\}" /> | 638 | <RegExpr attribute="Variable" context="#stay" String="\$\{[*@#?$!_0-9-]\}" /> | ||
639 | <RegExpr attribute="Variable" context="#stay" String="\$\{#&varname;(\[[*@]\])?\}" /> | 639 | <RegExpr attribute="Variable" context="#stay" String="\$\{#&varname;(\[[*@]\])?\}" /> | ||
640 | <RegExpr attribute="Variable" context="#stay" String="\$\{!&varname;(\[[*@]\]|[*@])?\}" /> | 640 | <RegExpr attribute="Variable" context="#stay" String="\$\{!&varname;(\[[*@]\]|[*@])?\}" /> | ||
641 | <RegExpr attribute="Variable" context="VarBrace" String="\$\{#?&varname;" /> | 641 | <RegExpr attribute="Variable" context="VarBrace" String="\$\{#?&varname;" /> | ||
642 | <RegExpr attribute="Variable" context="VarBrace" String="\$\{[*@#?$!_0-9-](?=[:#%/=?+-])" /> | 642 | <RegExpr attribute="Variable" context="VarBrace" String="\$\{[*@#?$!_0-9-](?=[:#%/=?+-])" /> | ||
643 | <StringDetect attribute="Variable" context="ExprDblParenSubst" String="$((" beginRegion="expression" /> | 643 | <StringDetect attribute="Variable" context="ExprDblParenSubst" String="$((" beginRegion="expression" /> | ||
644 | <StringDetect attribute="Redirection" context="SubstFile" String="$(<" /> | 644 | <StringDetect attribute="Redirection" context="SubstFile" String="$(<" /> | ||
645 | <StringDetect attribute="Variable" context="SubstCommand" String="$(" /> | 645 | <Detect2Chars attribute="Variable" context="SubstCommand" char="$" char1="(" /> | ||
646 | <DetectChar attribute="Backquote" context="SubstBackq" char="`" /> | 646 | <DetectChar attribute="Backquote" context="SubstBackq" char="`" /> | ||
647 | <RegExpr attribute="Escape" context="#stay" String="\\[`$\\]" /> | 647 | <RegExpr attribute="Escape" context="#stay" String="\\[`$\\]" /> | ||
648 | </context> | 648 | </context> | ||
649 | 649 | | |||
650 | <!-- FindTests finds operators valid in tests --> | 650 | <!-- FindTests finds operators valid in tests --> | ||
651 | <context attribute="Normal Text" lineEndContext="#stay" name="FindTests"> | 651 | <context attribute="Normal Text" lineEndContext="#stay" name="FindTests"> | ||
652 | <RegExpr attribute="Expression" context="#stay" String="-[abcdefghkprstuwxOGLSNozn](?=\s)"/> | 652 | <RegExpr attribute="Expression" context="#stay" String="-[abcdefghkprstuwxOGLSNozn](?=\s)"/> | ||
653 | <RegExpr attribute="Expression" context="#stay" String="-([no]t|ef)(?=\s)"/> | 653 | <RegExpr attribute="Expression" context="#stay" String="-([no]t|ef)(?=\s)"/> | ||
▲ Show 20 Lines • Show All 306 Lines • Show Last 20 Lines |
Please increase kateversion="5.0".