[neon/kf6/kf6-syntax-highlighting/Neon/stable] debian/patches: Revert "revert the latest fish update as it fails stranely in autorcc"
Carlos De Maine
null at kde.org
Mon May 25 23:03:36 BST 2026
Git commit 2506be314ab642f26edddbb1fc8d8d2235a654eb by Carlos De Maine.
Committed on 25/05/2026 at 22:03.
Pushed by carlosdem into branch 'Neon/stable'.
Revert "revert the latest fish update as it fails stranely in autorcc"
This reverts commit dab127c0f08cca3f379b3ad314c30162c39d634a
D +0 -2985 debian/patches/a0c1838c393e3644b394b2883c32834f0a3bf2b5.diff
D +0 -1 debian/patches/series
https://invent.kde.org/neon/kf6/kf6-syntax-highlighting/-/commit/2506be314ab642f26edddbb1fc8d8d2235a654eb
diff --git a/debian/patches/a0c1838c393e3644b394b2883c32834f0a3bf2b5.diff b/debian/patches/a0c1838c393e3644b394b2883c32834f0a3bf2b5.diff
deleted file mode 100644
index 87c086b..0000000
--- a/debian/patches/a0c1838c393e3644b394b2883c32834f0a3bf2b5.diff
+++ /dev/null
@@ -1,2985 +0,0 @@
-diff --git a/autotests/folding/highlight.fish.fold b/autotests/folding/highlight.fish.fold
-index 5eac7be66706956e40925af573b5e338675f1898..705c3b5e9d23e8ac6218c80fa5df6dc96a911e8e 100644
---- a/autotests/folding/highlight.fish.fold
-+++ b/autotests/folding/highlight.fish.fold
-@@ -4,13 +4,6 @@
- # fg sfg sfh sft
- # <endfold id='1'>END</endfold id='1'>
- #
--# text in (parenthesis) is ok, (even
--# over several lines)
--# escaped \) and \( are ok
--# an unbalanced single ) is not ok
--# This is due to fish comment handling in command substitutions
--# which cannot reasonably handled by kate syntax highlighting
--
-
- ### Commands and paths
- ls -l |sort
-@@ -32,7 +25,7 @@ usr/b?n/ls
- u*ls # doesn't work, but ok
- "ls" /tmp/testtest # Quotes in commands are expanded
- /us"r/bin"/xy/ls
--abcd$a # show error
-+abcd$a
- other) abc # show error
- <other abc # show error
- other> abc # ok
-@@ -51,6 +44,12 @@ ls/
- ls;echo xy
- flex++
- echo [abc] abc
-+\
-+\
-+cmd
-+
-+cmd\
-+#cmd
-
- #specials
- command -s ls
-@@ -63,11 +62,9 @@ set test1[1..$n] $test; echo $test1
- set test1[$n..1] $test; echo $test1
- set test1[2..4 -2..-4] $test1[4..2 -4..-2]; echo $test1
- set test1[2..4 -2..-4][1] $test1[4..2 -4..-2][1]
--# ~~~ invalid
- set test1\
- [2..4 -2..-4]\
- [1] a
--#~~ invalid
- set test1 \
- #bla bla
- a b c
-@@ -80,7 +77,8 @@ read -gi $test
- read -gi "test"
- read -gi (echo test)
-
--set x (string split --max 1 --right / (status current-filename) #Comment test)
-+set x (string split --max 1 --right / (status current-filename) #Comment test
-+)
- set test (exec $cmd)
-
- # direct path
-@@ -135,6 +133,7 @@ history merge
- true ;ls
- echo (true)
- echo (true #comment)
-+ls)
- echo (true>>xyz/abc)
- true -error # show error
- pwd > abc
-@@ -183,18 +182,14 @@ test -f /tmp/abc -a -e /tmp/def;cat /tmp/abc;
- echo x;<endfold id='2'>end</endfold id='2'>
-
- ### Redirections
--ls < SOURCE_FILE # stdin
--ls > DESTINATION # stdout
--ls ^ DESTINATION # stderr
--ls >> DESTINATION_FILE # append
--ls ^^ DESTINATION_FILE # append
--ls >? DESTINATION # noclobber
--ls ^? DESTINATION
--
--ls ^? ~
--ls ^? ~testuser/abc
--ls ^?/DESTINATION
--ls ^?#DESTINATION # show error
-+ls < SOURCE_FILE # stdin
-+ls > DESTINATION # stdout
-+ls >> DESTINATION_FILE # append
-+ls >? DESTINATION # noclobber
-+
-+ls ^ DESTINATION # removed since 3.5.0 (released June 16, 2022)
-+ls ^^ DESTINATION_FILE # removed since 3.5.0 (released June 16, 2022)
-+ls ^? DESTINATION # removed since 3.5.0 (released June 16, 2022)
-
- ls > $abc[5]
- ls >"abc"/defg$v/xyz
-@@ -206,9 +201,11 @@ ls /tmp/tst>&25? # show error
- ls /tmp/tst>&25 ? # ok
- ls 3>&- xyz
- ls 1<DESTINATION
--echo Hello > all_output.txt ^&1 xyz
-+echo Hello > all_output.txt >? xyz
- ls 2>&-;echo end
- ls xyz 2>|cat
-+echo sd'ds' 1>&2
-+echo sd'ds'1>&2
-
- ls>x
- abs>x
-@@ -253,6 +250,8 @@ echo $$foo[1..-1][5]
- echo $$foo[1..-1]\
- [5][2]\
- [5]
-+echo $$
-+echo $$$$$
-
- #show error
- echo $PATH[error
-@@ -267,22 +266,24 @@ echo input.{c,12h,TXT}
- echo input.{abc$test[(count $test)..1],(echo $txt)}
- echo input.{a{b,c},12h,TXT}} # show error
-
--
- ### Index range expansion
- echo (echo $a)[2..5]
- echo (echo $a)[2..5 1..3]
- echo (echo $a)[-1..1]
-
- ### Process expansion
--fg %ema # ???
--
-+echo %ema # removed (expect %self) since 3.0b1 (released December 11, 2018)
-+echo %self # removed since 4.0.0 (released February 27, 2025)
-
- ### Command substitution
- echo -n -s "$USER" @ "$__fish_prompt_hostname" ' ' (set_color $color_cwd) (/usr/bin/ls) (set_color normal)
-
--echo (#hallo)abc # ok
--echo (ls #hallo)abc # ok, die context-Tiefe ist anders
--echo (ls;#hallo)abc # als hier.
-+echo (#hallo)abc
-+)
-+echo (ls #hallo)abc
-+)
-+echo (ls;#hallo)abc
-+)
- echo (ls#hallo)abc # ok: # may be inner part of function names!
- echo (/usr/bin/ls)
- echo (ls >>mem/abc)
-@@ -302,11 +303,6 @@ echo (seq 10)\
- set x (echo dirlist; # blabla
- ls)
-
--## same, but commented out:
--
--# set x (echo dirlist; # blabla
--# ls)
--
- set pi (math "scale=10; 4*a(1)")
-
- ### Continuation lines
-diff --git a/autotests/html/highlight.fish.dark.html b/autotests/html/highlight.fish.dark.html
-index 5d7a58b490dfa837891480312d5f669a603653ab..bec7802b8e4fb5b62d6b651f9ac8cadfe6a1cd1d 100644
---- a/autotests/html/highlight.fish.dark.html
-+++ b/autotests/html/highlight.fish.dark.html
-@@ -10,13 +10,6 @@
- <span style="color:#7a7c7d"># fg sfg sfh sft</span>
- <span style="color:#7a7c7d"># </span><span style="color:#2980b9;background-color:#153042">END</span>
- <span style="color:#7a7c7d">#</span>
--<span style="color:#7a7c7d"># text in (parenthesis) is ok, (even</span>
--<span style="color:#7a7c7d"># over several lines)</span>
--<span style="color:#7a7c7d"># escaped \) and \( are ok</span>
--<span style="color:#7a7c7d"># an unbalanced single </span><span style="color:#da4453;text-decoration:underline">)</span> is not ok
--<span style="color:#7a7c7d"># This is due to fish comment handling in command substitutions</span>
--<span style="color:#7a7c7d"># which cannot reasonably handled by kate syntax highlighting</span>
--
-
- <span style="color:#7a7c7d">### Commands and paths</span>
- <span style="color:#8e44ad">ls</span> -l <span style="font-weight:bold">|</span><span style="color:#8e44ad">sort</span>
-@@ -33,17 +26,17 @@
- <span style="color:#0099ff;font-weight:bold">/usr/bin/</span><span style="color:#8e44ad">lsother</span>
- <span style="color:#0099ff;font-weight:bold">../test/root/bin/</span><span style="color:#8e44ad">fish</span> -c <span style="color:#f44f4f">"echo </span><span style="color:#27aeae">$t8</span><span style="color:#f44f4f">"</span>
- <span style="color:#0099ff;font-weight:bold">test/root/bin/</span><span style="color:#8e44ad">fish</span> -c <span style="color:#f44f4f">"echo </span><span style="color:#27aeae">$t8</span><span style="color:#f44f4f">"</span>
--<span style="color:#0099ff;font-weight:bold">u?r/bin/</span><span style="color:#8e44ad">ls</span>
--<span style="color:#0099ff;font-weight:bold">usr/b?n/</span><span style="color:#8e44ad">ls</span>
--<span style="color:#0099ff;font-weight:bold">u*</span><span style="color:#8e44ad">ls</span> <span style="color:#7a7c7d"># doesn't work, but ok</span>
-+<span style="color:#0099ff;font-weight:bold">u</span><span style="font-weight:bold">?</span><span style="color:#0099ff;font-weight:bold">r/bin/</span><span style="color:#8e44ad">ls</span>
-+<span style="color:#0099ff;font-weight:bold">usr/b</span><span style="font-weight:bold">?</span><span style="color:#0099ff;font-weight:bold">n/</span><span style="color:#8e44ad">ls</span>
-+<span style="color:#8e44ad">u</span><span style="font-weight:bold">*</span><span style="color:#8e44ad">ls</span> <span style="color:#7a7c7d"># doesn't work, but ok</span>
- <span style="color:#f44f4f">"ls"</span> /tmp/testtest <span style="color:#7a7c7d"># Quotes in commands are expanded</span>
- <span style="color:#0099ff;font-weight:bold">/us</span><span style="color:#f44f4f">"r/bin"</span><span style="color:#0099ff;font-weight:bold">/xy/</span><span style="color:#8e44ad">ls</span>
--<span style="color:#8e44ad">abcd</span><span style="color:#da4453;text-decoration:underline">$</span><span style="color:#8e44ad">a</span> <span style="color:#7a7c7d"># show error</span>
-+<span style="color:#8e44ad">abcd</span><span style="color:#27aeae">$a</span>
- <span style="color:#8e44ad">other</span><span style="color:#da4453;text-decoration:underline">)</span> abc <span style="color:#7a7c7d"># show error</span>
- <span style="color:#da4453;text-decoration:underline"><</span>other abc <span style="color:#7a7c7d"># show error</span>
- <span style="color:#8e44ad">other</span><span style="color:#3f8058">></span> abc <span style="color:#7a7c7d"># ok</span>
- <span style="color:#8e44ad">oth</span><span style="color:#3f8058">></span>er abc <span style="color:#7a7c7d"># ok</span>
--<span style="color:#8e44ad">ot</span><span style="color:#da4453;text-decoration:underline">(</span><span style="color:#8e44ad">her</span><span style="color:#da4453;text-decoration:underline">)</span> abc <span style="color:#7a7c7d"># show error</span>
-+<span style="color:#8e44ad">ot</span><span style="color:#da4453;text-decoration:underline">(</span><span style="color:#8e44ad">her</span><span style="color:#3daee9">)</span> abc <span style="color:#7a7c7d"># show error</span>
-
- <span style="color:#8e44ad">-cmd</span>
- <span style="color:#8e44ad">déjà-vu</span>
-@@ -57,6 +50,12 @@
- <span style="color:#8e44ad">ls</span><span style="font-weight:bold">;</span><span style="color:#609ca0">echo</span> xy
- <span style="color:#8e44ad">flex++</span>
- <span style="color:#609ca0">echo</span> [abc] abc
-+<span style="font-weight:bold">\</span>
-+<span style="font-weight:bold">\</span>
-+<span style="color:#8e44ad">cmd</span>
-+
-+<span style="color:#8e44ad">cmd</span><span style="font-weight:bold">\</span>
-+<span style="color:#8e44ad">#cmd</span>
-
- <span style="color:#7a7c7d">#specials</span>
- <span style="color:#609ca0">command</span> -s <span style="color:#8e44ad">ls</span>
-@@ -68,12 +67,10 @@
- <span style="color:#609ca0">set</span> <span style="color:#27aeae">test1</span><span style="color:#2980b9">[1..</span><span style="color:#27aeae">$n</span><span style="color:#2980b9">]</span> <span style="color:#27aeae">$test</span><span style="font-weight:bold">;</span> <span style="color:#609ca0">echo</span> <span style="color:#27aeae">$test1</span>
- <span style="color:#609ca0">set</span> <span style="color:#27aeae">test1</span><span style="color:#2980b9">[</span><span style="color:#27aeae">$n</span><span style="color:#2980b9">..1]</span> <span style="color:#27aeae">$test</span><span style="font-weight:bold">;</span> <span style="color:#609ca0">echo</span> <span style="color:#27aeae">$test1</span>
- <span style="color:#609ca0">set</span> <span style="color:#27aeae">test1</span><span style="color:#2980b9">[2..4 -2..-4]</span> <span style="color:#27aeae">$test1</span><span style="color:#2980b9">[4..2 -4..-2]</span><span style="font-weight:bold">;</span> <span style="color:#609ca0">echo</span> <span style="color:#27aeae">$test1</span>
--<span style="color:#609ca0">set</span> <span style="color:#27aeae">test1</span><span style="color:#2980b9">[2..4 -2..-4]</span>[1] <span style="color:#27aeae">$test1</span><span style="color:#2980b9">[4..2 -4..-2][1]</span>
--<span style="color:#7a7c7d"># ~~~ invalid</span>
-+<span style="color:#609ca0">set</span> <span style="color:#27aeae">test1</span><span style="color:#2980b9">[2..4 -2..-4][1]</span> <span style="color:#27aeae">$test1</span><span style="color:#2980b9">[4..2 -4..-2][1]</span>
- <span style="color:#609ca0">set</span> <span style="color:#27aeae">test1</span><span style="font-weight:bold">\</span>
- <span style="color:#2980b9">[2..4 -2..-4]</span><span style="font-weight:bold">\</span>
--[1] a
--<span style="color:#7a7c7d">#~~ invalid</span>
-+<span style="color:#2980b9">[1]</span> a
- <span style="color:#609ca0">set</span> <span style="color:#27aeae">test1</span> <span style="font-weight:bold">\</span>
- <span style="color:#7a7c7d">#bla bla</span>
- a b c
-@@ -86,16 +83,17 @@
- <span style="color:#609ca0">read</span> -gi <span style="color:#f44f4f">"test"</span>
- <span style="color:#609ca0">read</span> -gi <span style="color:#3daee9">(</span><span style="color:#609ca0">echo</span> test<span style="color:#3daee9">)</span>
-
--<span style="color:#609ca0">set</span> <span style="color:#27aeae">x</span> <span style="color:#3daee9">(</span><span style="color:#609ca0">string</span> <span style="color:#609ca0">split</span> --max 1 --right / <span style="color:#3daee9">(</span><span style="color:#609ca0">status</span> current-filename<span style="color:#3daee9">)</span> <span style="color:#7a7c7d">#Comment test</span><span style="color:#3daee9">)</span>
-+<span style="color:#609ca0">set</span> <span style="color:#27aeae">x</span> <span style="color:#3daee9">(</span><span style="color:#609ca0">string</span> <span style="color:#609ca0">split</span> --max 1 --right / <span style="color:#3daee9">(</span><span style="color:#609ca0">status</span> current-filename<span style="color:#3daee9">)</span> <span style="color:#7a7c7d">#Comment test</span>
-+<span style="color:#3daee9">)</span>
- <span style="color:#609ca0">set</span> <span style="color:#27aeae">test</span> <span style="color:#3daee9">(</span><span style="color:#609ca0">exec</span> <span style="color:#27aeae">$cmd</span><span style="color:#3daee9">)</span>
-
- <span style="color:#7a7c7d"># direct path</span>
--<span style="color:#609ca0">test</span> <span style="color:#3f8058">-d </span><span style="color:#27aeae">$tmpldir</span>/resources
-+<span style="color:#609ca0">test</span> <span style="color:#3f8058">-d</span> <span style="color:#27aeae">$tmpldir</span>/resources
-
- <span style="color:#7a7c7d">### Options</span>
- <span style="color:#8e44ad">cat</span> -l /usr/local/test<span style="color:#3f8058">></span>logfile
- <span style="color:#8e44ad">ls</span> --longopt<span style="color:#3f8058">=</span>/test
--<span style="color:#8e44ad">ls</span> -l<span style="color:#f44f4f">"kasdflakjs"</span> -r/usr/test -x../test/../bla -z<span style="font-weight:bold">~xyz</span>/hello
-+<span style="color:#8e44ad">ls</span> -l<span style="color:#f44f4f">"kasdflakjs"</span> -r/usr/test -x../test/../bla -z~xyz/hello
-
- <span style="color:#7a7c7d">### Arguments</span>
- <span style="color:#609ca0">echo</span> abc<span style="color:#f44f4f">"def"</span>ghi
-@@ -120,11 +118,11 @@
- <span style="color:#609ca0">test</span> .. abc
-
- <span style="color:#7a7c7d">### Escapes</span>
[suppressed due to size limit]
[suppressed due to size limit]
- <span style="color:#8e44ad">touch</span> sdf<span style="font-weight:bold">\xa5</span>lh<span style="font-weight:bold">\Xb7</span>kll<span style="font-weight:bold">\157</span>j<span style="font-weight:bold">\15</span>8hk<span style="font-weight:bold">\ua47b</span>z<span style="font-weight:bold">\U123b5678</span>fs<span style="font-weight:bold">\cx</span>zdfga
-
- <span style="color:#8e44ad">touch</span> <span style="color:#f44f4f">"a\?bc\[\]a"</span> <span style="color:#7a7c7d"># no escaping in Quotes</span>
--<span style="color:#8e44ad">touch</span> fgh\y1 <span style="color:#7a7c7d"># \y is no escape sequence in fish, show it as normal text like fish itself</span>
-+<span style="color:#8e44ad">touch</span> fgh<span style="font-weight:bold">\</span>y1 <span style="color:#7a7c7d"># \y is no escape sequence in fish, show it as normal text like fish itself</span>
-
- <span style="color:#7a7c7d">### Builtins</span>
- <span style="color:#609ca0">. </span>hallo
-@@ -140,9 +138,10 @@
-
- <span style="color:#609ca0">true</span> <span style="font-weight:bold">;</span><span style="color:#8e44ad">ls</span>
- <span style="color:#609ca0">echo</span> <span style="color:#3daee9">(</span><span style="color:#609ca0">true</span><span style="color:#3daee9">)</span>
--<span style="color:#609ca0">echo</span> <span style="color:#3daee9">(</span><span style="color:#609ca0">true</span> <span style="color:#7a7c7d">#comment</span><span style="color:#3daee9">)</span>
-+<span style="color:#609ca0">echo</span> <span style="color:#3daee9">(</span><span style="color:#609ca0">true</span> <span style="color:#7a7c7d">#comment)</span>
-+<span style="color:#8e44ad">ls</span><span style="color:#3daee9">)</span>
- <span style="color:#609ca0">echo</span> <span style="color:#3daee9">(</span><span style="color:#609ca0">true</span><span style="color:#3f8058">>></span>xyz/abc<span style="color:#3daee9">)</span>
--<span style="color:#609ca0">true</span> <span style="color:#da4453;text-decoration:underline">-error </span><span style="color:#7a7c7d"># show error</span>
-+<span style="color:#609ca0">true</span> <span style="color:#da4453;text-decoration:underline">-error</span> <span style="color:#7a7c7d"># show error</span>
- <span style="color:#609ca0">pwd</span> <span style="color:#3f8058">></span> abc
-
- <span style="color:#609ca0">command</span> -s <span style="color:#8e44ad">ls</span><span style="font-weight:bold">;</span><span style="color:#8e44ad">cat</span> test
-@@ -168,53 +167,51 @@
- <span style="color:#0099ff;font-weight:bold">/usr/test/</span><span style="color:#8e44ad">testtest</span> /usr/test/testtest
-
- <span style="color:#7a7c7d">### test</span>
--<span style="color:#609ca0">test</span> NUM1<span style="color:#3f8058"> -eq </span>NUM2
--<span style="color:#609ca0">test</span> <span style="color:#3f8058">-f </span>/tmp/abc <span style="color:#3f8058">-a -e </span>/tmp/def<span style="font-weight:bold">;</span><span style="color:#8e44ad">cat</span> /tmp/abc<span style="font-weight:bold">;</span>
-+<span style="color:#609ca0">test</span> NUM1 <span style="color:#3f8058">-eq</span> NUM2
-+<span style="color:#609ca0">test</span> <span style="color:#3f8058">-f</span> /tmp/abc <span style="color:#3f8058">-a</span> <span style="color:#3f8058">-e</span> /tmp/def<span style="font-weight:bold">;</span><span style="color:#8e44ad">cat</span> /tmp/abc<span style="font-weight:bold">;</span>
-
--<span style="color:#fdbc4b;font-weight:bold">if</span> <span style="color:#609ca0">test</span> <span style="font-weight:bold">\(</span> <span style="color:#3f8058">-f </span>/foo <span style="color:#3f8058">-o -f </span>/bar <span style="font-weight:bold">\)</span> <span style="color:#3f8058">-a </span><span style="font-weight:bold">\(</span> <span style="color:#3f8058">-f </span>/baz <span style="color:#3f8058">-o -f </span>/bat <span style="font-weight:bold">\)</span>
[suppressed due to size limit]
- <span style="color:#609ca0">echo</span> Success.
- <span style="color:#fdbc4b;font-weight:bold">end</span>
-
--<span style="color:#609ca0">[ </span>25<span style="color:#3f8058"> -eq </span><span style="color:#27aeae">$NUM2</span><span style="color:#609ca0"> ]</span>
--<span style="color:#609ca0">[ </span><span style="color:#f44f4f">"abc"</span> <span style="color:#3f8058">=</span> <span style="color:#f44f4f">"</span><span style="color:#27aeae">$STRING2</span><span style="color:#f44f4f">"</span><span style="color:#609ca0"> ]</span>
-+<span style="color:#609ca0">[ </span>25 <span style="color:#3f8058">-eq</span> <span style="color:#27aeae">$NUM2</span> <span style="color:#609ca0">]</span>
-+<span style="color:#609ca0">[ </span><span style="color:#f44f4f">"abc"</span> <span style="color:#3f8058">=</span> <span style="color:#f44f4f">"</span><span style="color:#27aeae">$STRING2</span><span style="color:#f44f4f">"</span> <span style="color:#609ca0">]</span>
-
--<span style="color:#fdbc4b;font-weight:bold">if</span> <span style="color:#609ca0">[ </span><span style="color:#3f8058">!</span> <span style="font-weight:bold">\(</span>STRING1 <span style="color:#3f8058">!=</span> STRING2<span style="font-weight:bold">\)</span><span style="color:#609ca0"> ]</span><span style="font-weight:bold">;</span><span style="color:#8e44ad">ls</span><span style="font-weight:bold">;</span><span style="color:#fdbc4b;font-weight:bold">end</span>
--<span style="color:#fdbc4b;font-weight:bold">if</span> <span style="color:#609ca0">[ </span><span style="color:#3f8058">-f </span>abc<span style="color:#609ca0"> ]</span><span style="color:#da4453;text-decoration:underline">#</span> <span style="color:#da4453;text-decoration:underline">show error</span>
-+<span style="color:#fdbc4b;font-weight:bold">if</span> <span style="color:#609ca0">[ </span><span style="color:#3f8058">!</span> <span style="font-weight:bold">\(</span>STRING1 <span style="color:#3f8058">!=</span> STRING2<span style="font-weight:bold">\)</span> <span style="color:#609ca0">]</span><span style="font-weight:bold">;</span><span style="color:#8e44ad">ls</span><span style="font-weight:bold">;</span><span style="color:#fdbc4b;font-weight:bold">end</span>
-+<span style="color:#fdbc4b;font-weight:bold">if</span> <span style="color:#609ca0">[ </span><span style="color:#3f8058">-f</span> abc ]# show error
- <span style="color:#fdbc4b;font-weight:bold">end</span>
--<span style="color:#fdbc4b;font-weight:bold">if</span> <span style="color:#609ca0">[ </span><span style="color:#3f8058">-f </span>abc<span style="color:#609ca0"> ]</span> <span style="color:#7a7c7d"># ok</span>
-+<span style="color:#fdbc4b;font-weight:bold">if</span> <span style="color:#609ca0">[ </span><span style="color:#3f8058">-f</span> abc <span style="color:#609ca0">]</span> <span style="color:#7a7c7d"># ok</span>
- <span style="color:#fdbc4b;font-weight:bold">end</span>
-
[suppressed due to size limit]
--<span style="color:#fdbc4b;font-weight:bold">if</span> <span style="color:#609ca0">[ </span><span style="color:#f44f4f">"abc"</span> <span style="color:#3f8058">!=</span> <span style="color:#f44f4f">"def"</span><span style="color:#609ca0"> ]</span> <span style="color:#7a7c7d"># hallo</span>
[suppressed due to size limit]
-+<span style="color:#fdbc4b;font-weight:bold">if</span> <span style="color:#609ca0">[ </span><span style="color:#f44f4f">"abc"</span> <span style="color:#3f8058">!=</span> <span style="color:#f44f4f">"def"</span> <span style="color:#609ca0">]</span> <span style="color:#7a7c7d"># hallo</span>
- <span style="color:#609ca0">echo</span> x<span style="font-weight:bold">;</span><span style="color:#fdbc4b;font-weight:bold">end</span>
-
- <span style="color:#7a7c7d">### Redirections</span>
--<span style="color:#8e44ad">ls</span> <span style="color:#3f8058"><</span> SOURCE_FILE <span style="color:#7a7c7d"># stdin</span>
--<span style="color:#8e44ad">ls</span> <span style="color:#3f8058">></span> DESTINATION <span style="color:#7a7c7d"># stdout</span>
--<span style="color:#8e44ad">ls</span> <span style="color:#3f8058">^</span> DESTINATION <span style="color:#7a7c7d"># stderr</span>
--<span style="color:#8e44ad">ls</span> <span style="color:#3f8058">>></span> DESTINATION_FILE <span style="color:#7a7c7d"># append</span>
--<span style="color:#8e44ad">ls</span> <span style="color:#3f8058">^^</span> DESTINATION_FILE <span style="color:#7a7c7d"># append</span>
--<span style="color:#8e44ad">ls</span> <span style="color:#3f8058">>?</span> DESTINATION <span style="color:#7a7c7d"># noclobber</span>
--<span style="color:#8e44ad">ls</span> <span style="color:#3f8058">^?</span> DESTINATION
--
--<span style="color:#8e44ad">ls</span> <span style="color:#3f8058">^?</span> <span style="font-weight:bold">~</span>
--<span style="color:#8e44ad">ls</span> <span style="color:#3f8058">^?</span> <span style="font-weight:bold">~testuser</span>/abc
--<span style="color:#8e44ad">ls</span> <span style="color:#3f8058">^?</span>/DESTINATION
--<span style="color:#8e44ad">ls</span> <span style="color:#3f8058">^?</span><span style="color:#da4453;text-decoration:underline">#</span>DESTINATION <span style="color:#7a7c7d"># show error</span>
-+<span style="color:#8e44ad">ls</span> <span style="color:#3f8058"><</span> SOURCE_FILE <span style="color:#7a7c7d"># stdin</span>
-+<span style="color:#8e44ad">ls</span> <span style="color:#3f8058">></span> DESTINATION <span style="color:#7a7c7d"># stdout</span>
-+<span style="color:#8e44ad">ls</span> <span style="color:#3f8058">>></span> DESTINATION_FILE <span style="color:#7a7c7d"># append</span>
-+<span style="color:#8e44ad">ls</span> <span style="color:#3f8058">>?</span> DESTINATION <span style="color:#7a7c7d"># noclobber</span>
-+
-+<span style="color:#8e44ad">ls</span> ^ DESTINATION <span style="color:#7a7c7d"># removed since 3.5.0 (released June 16, 2022)</span>
-+<span style="color:#8e44ad">ls</span> ^^ DESTINATION_FILE <span style="color:#7a7c7d"># removed since 3.5.0 (released June 16, 2022)</span>
-+<span style="color:#8e44ad">ls</span> ^<span style="font-weight:bold">?</span> DESTINATION <span style="color:#7a7c7d"># removed since 3.5.0 (released June 16, 2022)</span>
-
- <span style="color:#8e44ad">ls</span> <span style="color:#3f8058">></span> <span style="color:#27aeae">$abc</span><span style="color:#2980b9">[5]</span>
- <span style="color:#8e44ad">ls</span> <span style="color:#3f8058">></span><span style="color:#f44f4f">"abc"</span>/defg<span style="color:#27aeae">$v</span>/xyz
-
--<span style="color:#8e44ad">ls</span> <span style="color:#3f8058">></span><span style="color:#da4453;text-decoration:underline">&</span> <span style="color:#7a7c7d"># show error</span>
--<span style="color:#8e44ad">ls</span> <span style="color:#3f8058">></span> <span style="color:#da4453;text-decoration:underline">&</span>1 <span style="color:#7a7c7d"># show error</span>
-+<span style="color:#8e44ad">ls</span> <span style="color:#3f8058">></span><span style="color:#da4453;text-decoration:underline">&</span> <span style="color:#da4453;text-decoration:underline">#</span><span style="color:#7a7c7d"> show error</span>
-+<span style="color:#8e44ad">ls</span> <span style="color:#3f8058">></span> <span style="color:#da4453;text-decoration:underline">&</span><span style="color:#8e44ad">1</span> <span style="color:#7a7c7d"># show error</span>
- <span style="color:#8e44ad">ls</span> abc<span style="color:#3f8058">>&25</span> xyz /tmp/xyz <span style="color:#27aeae">$abc</span>
--<span style="color:#8e44ad">ls</span> /tmp/tst<span style="color:#3f8058">>&25</span><span style="color:#da4453;text-decoration:underline">?</span> <span style="color:#7a7c7d"># show error</span>
-+<span style="color:#8e44ad">ls</span> /tmp/tst<span style="color:#3f8058">>&25</span><span style="font-weight:bold">?</span> <span style="color:#7a7c7d"># show error</span>
- <span style="color:#8e44ad">ls</span> /tmp/tst<span style="color:#3f8058">>&25</span> <span style="font-weight:bold">?</span> <span style="color:#7a7c7d"># ok</span>
- <span style="color:#8e44ad">ls</span> <span style="color:#3f8058">3>&-</span> xyz
- <span style="color:#8e44ad">ls</span> <span style="color:#3f8058">1<</span>DESTINATION
--<span style="color:#609ca0">echo</span> Hello <span style="color:#3f8058">></span> all_output.txt <span style="color:#3f8058">^&1</span> xyz
-+<span style="color:#609ca0">echo</span> Hello <span style="color:#3f8058">></span> all_output.txt <span style="color:#3f8058">>?</span> xyz
- <span style="color:#8e44ad">ls</span> <span style="color:#3f8058">2>&-</span><span style="font-weight:bold">;</span><span style="color:#609ca0">echo</span> end
- <span style="color:#8e44ad">ls</span> xyz <span style="color:#3f8058">2>|</span><span style="color:#8e44ad">cat</span>
-+<span style="color:#609ca0">echo</span> sd<span style="color:#f44f4f">'ds'</span> <span style="color:#3f8058">1>&2</span>
-+<span style="color:#609ca0">echo</span> sd<span style="color:#f44f4f">'ds'</span>1<span style="color:#3f8058">>&2</span>
-
- <span style="color:#8e44ad">ls</span><span style="color:#3f8058">></span>x
- <span style="color:#8e44ad">abs</span><span style="color:#3f8058">></span>x
-@@ -259,67 +256,66 @@
- <span style="color:#609ca0">echo</span> <span style="color:#27aeae">$$foo</span><span style="color:#2980b9">[1..-1]</span><span style="font-weight:bold">\</span>
- <span style="color:#2980b9">[5][2]</span><span style="font-weight:bold">\</span>
- <span style="color:#2980b9">[5]</span>
-+<span style="color:#609ca0">echo</span> <span style="color:#27aeae">$</span><span style="color:#da4453;text-decoration:underline">$</span>
-+<span style="color:#609ca0">echo</span> <span style="color:#27aeae">$$$$</span><span style="color:#da4453;text-decoration:underline">$</span>
-
- <span style="color:#7a7c7d">#show error</span>
--<span style="color:#609ca0">echo</span> <span style="color:#27aeae">$PATH</span><span style="color:#2980b9">[</span><span style="color:#da4453;text-decoration:underline">error</span>
--<span style="color:#609ca0">echo</span> <span style="color:#27aeae">$PATH</span><span style="color:#2980b9">[1..</span><span style="color:#da4453;text-decoration:underline">error</span><span style="color:#2980b9">]</span>
-+<span style="color:#609ca0">echo</span> <span style="color:#27aeae">$PATH</span><span style="color:#2980b9">[</span><span style="color:#da4453;text-decoration:underline">e</span>rror
-+<span style="color:#609ca0">echo</span> <span style="color:#27aeae">$PATH</span><span style="color:#2980b9">[1..</span><span style="color:#da4453;text-decoration:underline">e</span>rror]
-
--<span style="color:#609ca0">echo</span> <span style="color:#27aeae">$PATH</span><span style="color:#2980b9">[1 2 34</span> <span style="color:#2980b9">]</span>
-+<span style="color:#609ca0">echo</span> <span style="color:#27aeae">$PATH</span><span style="color:#2980b9">[1 2 34 ]</span>
- <span style="color:#609ca0">echo</span> <span style="color:#27aeae">$PATH</span><span style="color:#2980b9">[1.. 2]</span>
--<span style="color:#609ca0">echo</span> <span style="color:#27aeae">$PATH</span><span style="color:#2980b9">[1</span> <span style="color:#2980b9">..2]</span>
-+<span style="color:#609ca0">echo</span> <span style="color:#27aeae">$PATH</span><span style="color:#2980b9">[1 ..2]</span>
-
- <span style="color:#7a7c7d">### Brace Expansion</span>
- <span style="color:#609ca0">echo</span> input.<span style="color:#3daee9">{</span>c<span style="font-weight:bold">,</span>12h<span style="font-weight:bold">,</span>TXT<span style="color:#3daee9">}</span>
[suppressed due to size limit]
- <span style="color:#609ca0">echo</span> input.<span style="color:#3daee9">{</span>a<span style="color:#3daee9">{</span>b<span style="font-weight:bold">,</span>c<span style="color:#3daee9">}</span><span style="font-weight:bold">,</span>12h<span style="font-weight:bold">,</span>TXT<span style="color:#3daee9">}</span><span style="color:#da4453;text-decoration:underline">}</span> <span style="color:#7a7c7d"># show error</span>
-
--
- <span style="color:#7a7c7d">### Index range expansion</span>
- <span style="color:#609ca0">echo</span> <span style="color:#3daee9">(</span><span style="color:#609ca0">echo</span> <span style="color:#27aeae">$a</span><span style="color:#3daee9">)</span><span style="color:#2980b9">[2..5]</span>
- <span style="color:#609ca0">echo</span> <span style="color:#3daee9">(</span><span style="color:#609ca0">echo</span> <span style="color:#27aeae">$a</span><span style="color:#3daee9">)</span><span style="color:#2980b9">[2..5 1..3]</span>
- <span style="color:#609ca0">echo</span> <span style="color:#3daee9">(</span><span style="color:#609ca0">echo</span> <span style="color:#27aeae">$a</span><span style="color:#3daee9">)</span><span style="color:#2980b9">[-1..1]</span>
-
- <span style="color:#7a7c7d">### Process expansion</span>
--<span style="color:#609ca0">fg</span> <span style="color:#3daee9">%</span><span style="color:#27ae60">ema</span> <span style="color:#7a7c7d"># ???</span>
--
-+<span style="color:#609ca0">echo</span> %ema <span style="color:#7a7c7d"># removed (expect %self) since 3.0b1 (released December 11, 2018)</span>
-+<span style="color:#609ca0">echo</span> %self <span style="color:#7a7c7d"># removed since 4.0.0 (released February 27, 2025)</span>
-
- <span style="color:#7a7c7d">### Command substitution</span>
[suppressed due to size limit]
-
--<span style="color:#609ca0">echo</span> <span style="color:#3daee9">(</span><span style="color:#7a7c7d">#hallo</span><span style="color:#3daee9">)</span>abc <span style="color:#7a7c7d"># ok</span>
--<span style="color:#609ca0">echo</span> <span style="color:#3daee9">(</span><span style="color:#8e44ad">ls</span> <span style="color:#7a7c7d">#hallo</span><span style="color:#3daee9">)</span>abc <span style="color:#7a7c7d"># ok, die context-Tiefe ist anders</span>
--<span style="color:#609ca0">echo</span> <span style="color:#3daee9">(</span><span style="color:#8e44ad">ls</span><span style="font-weight:bold">;</span><span style="color:#7a7c7d">#hallo</span><span style="color:#3daee9">)</span>abc <span style="color:#7a7c7d"># als hier.</span>
-+<span style="color:#609ca0">echo</span> <span style="color:#3daee9">(</span><span style="color:#7a7c7d">#hallo)abc</span>
-+<span style="color:#3daee9">)</span>
-+<span style="color:#609ca0">echo</span> <span style="color:#3daee9">(</span><span style="color:#8e44ad">ls</span> <span style="color:#7a7c7d">#hallo)abc</span>
-+<span style="color:#3daee9">)</span>
-+<span style="color:#609ca0">echo</span> <span style="color:#3daee9">(</span><span style="color:#8e44ad">ls</span><span style="font-weight:bold">;</span><span style="color:#7a7c7d">#hallo)abc</span>
-+<span style="color:#3daee9">)</span>
- <span style="color:#609ca0">echo</span> <span style="color:#3daee9">(</span><span style="color:#8e44ad">ls#hallo</span><span style="color:#3daee9">)</span>abc <span style="color:#7a7c7d"># ok: # may be inner part of function names!</span>
- <span style="color:#609ca0">echo</span> <span style="color:#3daee9">(</span><span style="color:#0099ff;font-weight:bold">/usr/bin/</span><span style="color:#8e44ad">ls</span><span style="color:#3daee9">)</span>
- <span style="color:#609ca0">echo</span> <span style="color:#3daee9">(</span><span style="color:#8e44ad">ls</span> <span style="color:#3f8058">>></span>mem/abc<span style="color:#3daee9">)</span>
- <span style="color:#609ca0">echo</span> <span style="color:#3daee9">(</span><span style="color:#609ca0">echo</span> <span style="color:#27aeae">$test</span><span style="color:#2980b9">[2]</span><span style="color:#3daee9">)</span>
- <span style="color:#609ca0">echo</span> <span style="color:#3daee9">(</span><span style="color:#0099ff;font-weight:bold">/usr</span><span style="color:#f44f4f">"/bi"</span><span style="color:#0099ff;font-weight:bold">n/</span><span style="color:#8e44ad">ls</span> /tmp<span style="color:#3daee9">)</span>
--<span style="color:#609ca0">echo</span> <span style="color:#3daee9">(</span><span style="color:#8e44ad">seq</span> 10<span style="color:#3daee9">)</span><span style="color:#2980b9">[1]</span>[2]
-+<span style="color:#609ca0">echo</span> <span style="color:#3daee9">(</span><span style="color:#8e44ad">seq</span> 10<span style="color:#3daee9">)</span><span style="color:#2980b9">[1][2]</span>
- <span style="color:#7a7c7d"># ~~~ not an index</span>
- <span style="color:#609ca0">echo</span> <span style="color:#3daee9">(</span><span style="color:#8e44ad">seq</span> 10<span style="color:#3daee9">)</span><span style="font-weight:bold">\</span>
--<span style="color:#2980b9">[1]</span>[2]
-+<span style="color:#2980b9">[1][2]</span>
- <span style="color:#7a7c7d"># ~~~ not an index</span>
- <span style="color:#609ca0">echo</span> <span style="color:#3daee9">(</span><span style="color:#8e44ad">seq</span> 10<span style="color:#3daee9">)</span><span style="font-weight:bold">\</span>
- <span style="color:#2980b9">[1]</span><span style="font-weight:bold">\</span>
--[2]
-+<span style="color:#2980b9">[2]</span>
- <span style="color:#7a7c7d">#~~ not an index</span>
-
- <span style="color:#7a7c7d"># multline command substitution</span>
- <span style="color:#609ca0">set</span> <span style="color:#27aeae">x</span> <span style="color:#3daee9">(</span><span style="color:#609ca0">echo</span> dirlist<span style="font-weight:bold">;</span> <span style="color:#7a7c7d"># blabla</span>
- <span style="color:#8e44ad">ls</span><span style="color:#3daee9">)</span>
-
--<span style="color:#7a7c7d">## same, but commented out:</span>
--
--<span style="color:#7a7c7d"># set x (echo dirlist; # blabla</span>
--<span style="color:#7a7c7d"># ls)</span>
--
- <span style="color:#609ca0">set</span> <span style="color:#27aeae">pi</span> <span style="color:#3daee9">(</span><span style="color:#609ca0">math</span> <span style="color:#f44f4f">"scale=10; 4*a(1)"</span><span style="color:#3daee9">)</span>
-
- <span style="color:#7a7c7d">### Continuation lines</span>
- <span style="color:#8e44ad">ls</span> <span style="font-weight:bold">\</span>
- /usr/bin
-
--<span style="color:#609ca0">test</span> <span style="color:#f44f4f">"STRING1"</span><span style="color:#3f8058">=</span><span style="color:#f44f4f">"STRING2"</span> <span style="color:#3f8058">-a </span><span style="font-weight:bold">\</span>
-+<span style="color:#609ca0">test</span> <span style="color:#f44f4f">"STRING1"</span>=<span style="color:#f44f4f">"STRING2"</span> <span style="color:#3f8058">-a</span> <span style="font-weight:bold">\</span>
- <span style="color:#f44f4f">"STRING3"</span> <span style="color:#3f8058">=</span> <span style="color:#3daee9">(</span><span style="color:#609ca0">echo</span> <span style="color:#f44f4f">"STRING4"</span><span style="color:#3daee9">)</span>
-
- <span style="color:#609ca0">echo</span> input.<span style="color:#3daee9">{</span>abc<span style="font-weight:bold">\</span>
-@@ -336,7 +332,7 @@ TXT<span style="color:#3daee9">}</span>
- <span style="color:#609ca0">echo</span> <span style="color:#f44f4f">"123456</span><span style="font-weight:bold">\</span>
- <span style="color:#f44f4f"> 78910"</span>
- <span style="color:#609ca0">echo</span> <span style="color:#27aeae">$PATH</span><span style="color:#2980b9">[1..3</span><span style="font-weight:bold">\</span>
-- <span style="color:#2980b9">]</span>
-+<span style="color:#2980b9"> ]</span>
- <span style="color:#8e44ad">ls</span> /usr<span style="font-weight:bold">\</span>
- local/bin
- <span style="color:#609ca0">echo</span> foo<span style="font-weight:bold">\ </span>bar
-@@ -344,7 +340,7 @@ local/bin
- bar
-
- <span style="color:#fdbc4b;font-weight:bold">for</span> <span style="color:#27aeae">i</span> <span style="font-weight:bold">\</span>
-- <span style="color:#fdbc4b;font-weight:bold">in</span> <span style="font-weight:bold">\</span>
-+ <span style="font-weight:bold">in</span> <span style="font-weight:bold">\</span>
- a b c
- <span style="color:#609ca0">echo</span> <span style="color:#27aeae">$i</span>
- <span style="color:#fdbc4b;font-weight:bold">end</span>
-@@ -400,37 +396,37 @@ bar
- <span style="color:#8e44ad">diff</span> <span style="color:#3daee9">(</span><span style="color:#8e44ad">sort</span> a.txt <span style="font-weight:bold">|</span> <span style="color:#609ca0">psub</span><span style="color:#3daee9">)</span> <span style="color:#3daee9">(</span><span style="color:#8e44ad">sort</span> b.txt <span style="font-weight:bold">|</span> <span style="color:#609ca0">psub</span><span style="color:#3daee9">)</span>
- <span style="color:#8e44ad">source-highlight</span> -f esc <span style="color:#3daee9">(</span><span style="color:#8e44ad">cpp</span> main.c <span style="font-weight:bold">|</span> <span style="color:#609ca0">psub</span> -s .c<span style="color:#3daee9">)</span>
-
--<span style="color:#fdbc4b;font-weight:bold">while</span> <span style="color:#609ca0">test</span> <span style="color:#3f8058">-f </span>foo.txt <span style="color:#7a7c7d"># comment</span>
-+<span style="color:#fdbc4b;font-weight:bold">while</span> <span style="color:#609ca0">test</span> <span style="color:#3f8058">-f</span> foo.txt <span style="color:#7a7c7d"># comment</span>
- <span style="color:#609ca0">echo</span> hallo
- <span style="color:#fdbc4b;font-weight:bold">end</span>
-
--<span style="color:#fdbc4b;font-weight:bold">for</span> <span style="color:#27aeae">i</span> <span style="color:#fdbc4b;font-weight:bold">in</span> <span style="color:#3daee9">{</span>1<span style="font-weight:bold">,</span><span style="color:#3daee9">(</span><span style="color:#8e44ad">ls</span><span style="color:#3daee9">)</span><span style="font-weight:bold">,</span>3<span style="color:#3daee9">}</span> <span style="color:#7a7c7d"># comment</span>
-+<span style="color:#fdbc4b;font-weight:bold">for</span> <span style="color:#27aeae">i</span> <span style="font-weight:bold">in</span> <span style="color:#3daee9">{</span>1<span style="font-weight:bold">,</span><span style="color:#3daee9">(</span><span style="color:#8e44ad">ls</span><span style="color:#3daee9">)</span><span style="font-weight:bold">,</span>3<span style="color:#3daee9">}</span> <span style="color:#7a7c7d"># comment</span>
- <span style="color:#609ca0">echo</span> <span style="color:#27aeae">$i</span>
- <span style="color:#fdbc4b;font-weight:bold">end</span>
-
- <span style="color:#7a7c7d"># function</span>
--<span style="color:#fdbc4b;font-weight:bold">function</span> <span style="color:#8e44ad">__hidden</span> <span style="color:#7a7c7d"># comment</span>
-+<span style="font-weight:bold">function</span> <span style="color:#8e44ad">__hidden</span> <span style="color:#7a7c7d"># comment</span>
- <span style="color:#609ca0">cd</span> /
- <span style="color:#fdbc4b;font-weight:bold">end</span>
-
--<span style="color:#fdbc4b;font-weight:bold">function</span> <span style="color:#8e44ad">ll</span> <span style="font-weight:bold">\</span>
-+<span style="font-weight:bold">function</span> <span style="color:#8e44ad">ll</span> <span style="font-weight:bold">\</span>
- -d <span style="color:#a43340">"multiline</span>
- <span style="color:#a43340"> description"</span>
- <span style="color:#8e44ad">ls</span> -l <span style="color:#27aeae">$argv</span>
- <span style="color:#fdbc4b;font-weight:bold">end</span>
-
--<span style="color:#fdbc4b;font-weight:bold">function</span> <span style="color:#8e44ad">ls</span> --description=<span style="color:#a43340">"Description"</span> -a a b c <span style="color:#7a7c7d"># comment</span>
-+<span style="font-weight:bold">function</span> <span style="color:#8e44ad">ls</span> --description=<span style="color:#a43340">"Description"</span> -a a b c <span style="color:#7a7c7d"># comment</span>
- <span style="color:#609ca0">command</span> <span style="color:#8e44ad">ls</span> --color<span style="color:#3f8058">=</span>auto <span style="color:#27aeae">$argv</span>
-- <span style="color:#fdbc4b;font-weight:bold">if</span> <span style="color:#609ca0">test</span> <span style="color:#3f8058">-f </span>foo.txt
-+ <span style="color:#fdbc4b;font-weight:bold">if</span> <span style="color:#609ca0">test</span> <span style="color:#3f8058">-f</span> foo.txt
- <span style="color:#609ca0">echo</span> foo.txt exists
-- <span style="color:#fdbc4b;font-weight:bold">else</span> <span style="color:#fdbc4b;font-weight:bold">if</span> <span style="color:#609ca0">test</span> <span style="color:#3f8058">-f </span>bar.txt <span style="color:#7a7c7d"># comment</span>
-+ <span style="color:#fdbc4b;font-weight:bold">else</span> <span style="color:#fdbc4b;font-weight:bold">if</span> <span style="color:#609ca0">test</span> <span style="color:#3f8058">-f</span> bar.txt <span style="color:#7a7c7d"># comment</span>
- <span style="color:#609ca0">echo</span> bar.txt exists
- <span style="color:#fdbc4b;font-weight:bold">else</span>
- <span style="color:#609ca0">echo</span> foo.txt and bar.txt do not exist
- <span style="color:#fdbc4b;font-weight:bold">end</span> <span style="color:#7a7c7d"># comment</span>
- <span style="color:#fdbc4b;font-weight:bold">end</span>
-
--<span style="color:#fdbc4b;font-weight:bold">function</span> <span style="color:#8e44ad">test</span><span style="font-weight:bold">;</span><span style="color:#609ca0">echo</span> hallo<span style="font-weight:bold">;</span><span style="color:#fdbc4b;font-weight:bold">end</span> <span style="color:#7a7c7d"># comment</span>
-+<span style="font-weight:bold">function</span> <span style="color:#8e44ad">test</span><span style="font-weight:bold">;</span><span style="color:#609ca0">echo</span> hallo<span style="font-weight:bold">;</span><span style="color:#fdbc4b;font-weight:bold">end</span> <span style="color:#7a7c7d"># comment</span>
-
- <span style="color:#fdbc4b;font-weight:bold">switch</span> <span style="color:#27aeae">$animal</span> <span style="color:#7a7c7d"># comment</span>
- <span style="color:#fdbc4b;font-weight:bold">case</span> cat <span style="color:#7a7c7d"># comment</span>
-@@ -448,41 +444,41 @@ bar
- <span style="color:#609ca0">echo</span> <span style="color:#f44f4f">"?"</span>
- <span style="color:#fdbc4b;font-weight:bold">end</span>
-
--<span style="color:#fdbc4b;font-weight:bold">if</span> <span style="color:#fdbc4b;font-weight:bold">not</span> <span style="color:#609ca0">test</span> <span style="color:#3f8058">-f </span>spoon <span style="color:#7a7c7d">#comment</span>
-+<span style="color:#fdbc4b;font-weight:bold">if</span> <span style="color:#fdbc4b;font-weight:bold">not</span> <span style="color:#609ca0">test</span> <span style="color:#3f8058">-f</span> spoon <span style="color:#7a7c7d">#comment</span>
- <span style="color:#609ca0">echo</span> There is no spoon
- <span style="color:#fdbc4b;font-weight:bold">else</span>
- <span style="color:#609ca0">exit</span> 1
- <span style="color:#fdbc4b;font-weight:bold">end</span>
-
--<span style="color:#fdbc4b;font-weight:bold">for</span> <span style="color:#27aeae">file</span> <span style="color:#fdbc4b;font-weight:bold">in</span> <span style="color:#27aeae">$cfgfiles</span>
-- <span style="color:#fdbc4b;font-weight:bold">if</span> <span style="color:#609ca0">test</span> <span style="color:#3f8058">-f </span><span style="color:#27aeae">$file</span>
-+<span style="color:#fdbc4b;font-weight:bold">for</span> <span style="color:#27aeae">file</span> <span style="font-weight:bold">in</span> <span style="color:#27aeae">$cfgfiles</span>
-+ <span style="color:#fdbc4b;font-weight:bold">if</span> <span style="color:#609ca0">test</span> <span style="color:#3f8058">-f</span> <span style="color:#27aeae">$file</span>
- <span style="color:#609ca0">string</span> <span style="color:#609ca0">match</span> -r <span style="color:#f44f4f">'\[Dialer'</span> <span style="color:#3f8058"><</span> <span style="color:#27aeae">$file</span> <span style="font-weight:bold">|</span> <span style="color:#609ca0">string</span> <span style="color:#609ca0">replace</span> -r <span style="color:#f44f4f">'\[Dialer (.+)\]'</span> <span style="color:#f44f4f">'$1'</span>
- <span style="color:#fdbc4b;font-weight:bold">end</span>
- <span style="color:#fdbc4b;font-weight:bold">end</span> <span style="font-weight:bold">|</span> <span style="color:#8e44ad">sort</span> -u <span style="font-weight:bold">|</span> <span style="color:#609ca0">string</span> <span style="color:#609ca0">match</span> -v Defaults
-
--<span style="color:#fdbc4b;font-weight:bold">for</span> <span style="color:#27aeae">i</span> <span style="color:#fdbc4b;font-weight:bold">in</span> <span style="font-weight:bold">*</span>.c
-+<span style="color:#fdbc4b;font-weight:bold">for</span> <span style="color:#27aeae">i</span> <span style="font-weight:bold">in</span> <span style="font-weight:bold">*</span>.c
- <span style="color:#fdbc4b;font-weight:bold">if</span> <span style="color:#8e44ad">grep</span> smurf <span style="color:#27aeae">$i</span> <span style="color:#7a7c7d"># comment</span>
- <span style="color:#609ca0">echo</span> Smurfs are present in <span style="color:#27aeae">$i</span>
-- <span style="color:#609ca0">break</span>
-+ <span style="color:#fdbc4b;font-weight:bold">break</span>
- <span style="color:#fdbc4b;font-weight:bold">end</span>
- <span style="color:#fdbc4b;font-weight:bold">end</span>
-
--<span style="color:#fdbc4b;font-weight:bold">if</span> <span style="color:#fdbc4b;font-weight:bold">begin</span> <span style="color:#609ca0">contains</span> -- <span style="color:#27aeae">$argv</span> --force <span style="color:#7a7c7d"># ohne ; nach begin: geht</span>
-+<span style="color:#fdbc4b;font-weight:bold">if</span> <span style="font-weight:bold">begin</span> <span style="color:#609ca0">contains</span> -- <span style="color:#27aeae">$argv</span> --force <span style="color:#7a7c7d"># ohne ; nach begin: geht</span>
- <span style="color:#fdbc4b;font-weight:bold">or</span> <span style="color:#fdbc4b;font-weight:bold">not</span> <span style="color:#609ca0">status</span> --is-interactive and not status --is-login
-- <span style="color:#fdbc4b;font-weight:bold">end</span>
-+ <span style="font-weight:bold">end</span>
- <span style="color:#609ca0">echo</span> <span style="color:#f44f4f">""</span>
- <span style="color:#fdbc4b;font-weight:bold">end</span>
-
--<span style="color:#fdbc4b;font-weight:bold">begin</span> <span style="color:#7a7c7d"># comment</span>
-- <span style="color:#fdbc4b;font-weight:bold">for</span> <span style="color:#27aeae">i</span> <span style="color:#fdbc4b;font-weight:bold">in</span> <span style="font-weight:bold">*</span>.tmp
-+<span style="font-weight:bold">begin</span> <span style="color:#7a7c7d"># comment</span>
-+ <span style="color:#fdbc4b;font-weight:bold">for</span> <span style="color:#27aeae">i</span> <span style="font-weight:bold">in</span> <span style="font-weight:bold">*</span>.tmp
- <span style="color:#fdbc4b;font-weight:bold">if</span> <span style="color:#8e44ad">grep</span> smurf <span style="color:#27aeae">$i</span>
-- <span style="color:#609ca0">continue</span>
-+ <span style="color:#fdbc4b;font-weight:bold">continue</span>
- <span style="color:#fdbc4b;font-weight:bold">end</span>
- <span style="color:#8e44ad">rm</span> <span style="color:#27aeae">$i</span>
- <span style="color:#fdbc4b;font-weight:bold">end</span>
--<span style="color:#fdbc4b;font-weight:bold">end</span>
-+<span style="font-weight:bold">end</span>
-
--<span style="color:#fdbc4b;font-weight:bold">if</span> <span style="color:#609ca0">[ </span><span style="color:#27aeae">$status</span><span style="color:#3f8058"> -eq </span>1<span style="color:#609ca0"> ]</span>
-+<span style="color:#fdbc4b;font-weight:bold">if</span> <span style="color:#609ca0">[ </span><span style="color:#27aeae">$status</span> <span style="color:#3f8058">-eq</span> 1 <span style="color:#609ca0">]</span>
- <span style="color:#609ca0">set</span> <span style="color:#27aeae">sta</span> pass
- <span style="color:#fdbc4b;font-weight:bold">else</span>
- <span style="color:#609ca0">set</span> <span style="color:#27aeae">sta</span> fail
-@@ -493,11 +489,11 @@ bar
-
- <span style="color:#7a7c7d"># Process Expansion</span>
- <span style="color:#7a7c7d"># see fish issue 4230</span>
--<span style="color:#8e44ad">kill</span> -STOP <span style="color:#3daee9">%</span><span style="color:#27ae60">self</span>
-+<span style="color:#8e44ad">kill</span> -STOP %self
-
- <span style="color:#8e44ad">endcmd</span> <span style="color:#7a7c7d"># is a command</span>
-
--<span style="color:#fdbc4b;font-weight:bold">for</span> <span style="color:#27aeae">inc</span> <span style="color:#fdbc4b;font-weight:bold">in</span> a <span style="color:#7a7c7d"># inc is a variable</span>
-+<span style="color:#fdbc4b;font-weight:bold">for</span> <span style="color:#27aeae">inc</span> <span style="font-weight:bold">in</span> a <span style="color:#7a7c7d"># inc is a variable</span>
- <span style="color:#fdbc4b;font-weight:bold">end</span>
-
- <span style="color:#fdbc4b;font-weight:bold">switch</span> d<span style="font-weight:bold">;</span><span style="color:#fdbc4b;font-weight:bold">case</span> <span style="color:#f44f4f">"*"</span> <span style="font-weight:bold">;</span> <span style="color:#fdbc4b;font-weight:bold">case</span> d<span style="font-weight:bold">;</span><span style="color:#609ca0">echo</span><span style="font-weight:bold">;</span> <span style="color:#fdbc4b;font-weight:bold">end</span>
-diff --git a/autotests/html/highlight.fish.html b/autotests/html/highlight.fish.html
-index 827950fade88bbea969fbcb562b84e83314236e6..117cd10c891b93d5a1ede7c3d8ce749cdb1b1c10 100644
---- a/autotests/html/highlight.fish.html
-+++ b/autotests/html/highlight.fish.html
-@@ -10,13 +10,6 @@
- <span style="color:#898887"># fg sfg sfh sft</span>
- <span style="color:#898887"># </span><span style="color:#0057ae;background-color:#e0e9f8">END</span>
- <span style="color:#898887">#</span>
--<span style="color:#898887"># text in (parenthesis) is ok, (even</span>
--<span style="color:#898887"># over several lines)</span>
--<span style="color:#898887"># escaped \) and \( are ok</span>
--<span style="color:#898887"># an unbalanced single </span><span style="color:#bf0303;text-decoration:underline">)</span> is not ok
--<span style="color:#898887"># This is due to fish comment handling in command substitutions</span>
--<span style="color:#898887"># which cannot reasonably handled by kate syntax highlighting</span>
--
-
- <span style="color:#898887">### Commands and paths</span>
- <span style="color:#644a9b">ls</span> -l <span style="font-weight:bold">|</span><span style="color:#644a9b">sort</span>
-@@ -33,17 +26,17 @@
- <span style="color:#0095ff;font-weight:bold">/usr/bin/</span><span style="color:#644a9b">lsother</span>
- <span style="color:#0095ff;font-weight:bold">../test/root/bin/</span><span style="color:#644a9b">fish</span> -c <span style="color:#bf0303">"echo </span><span style="color:#0057ae">$t8</span><span style="color:#bf0303">"</span>
- <span style="color:#0095ff;font-weight:bold">test/root/bin/</span><span style="color:#644a9b">fish</span> -c <span style="color:#bf0303">"echo </span><span style="color:#0057ae">$t8</span><span style="color:#bf0303">"</span>
--<span style="color:#0095ff;font-weight:bold">u?r/bin/</span><span style="color:#644a9b">ls</span>
--<span style="color:#0095ff;font-weight:bold">usr/b?n/</span><span style="color:#644a9b">ls</span>
--<span style="color:#0095ff;font-weight:bold">u*</span><span style="color:#644a9b">ls</span> <span style="color:#898887"># doesn't work, but ok</span>
-+<span style="color:#0095ff;font-weight:bold">u</span><span style="font-weight:bold">?</span><span style="color:#0095ff;font-weight:bold">r/bin/</span><span style="color:#644a9b">ls</span>
-+<span style="color:#0095ff;font-weight:bold">usr/b</span><span style="font-weight:bold">?</span><span style="color:#0095ff;font-weight:bold">n/</span><span style="color:#644a9b">ls</span>
-+<span style="color:#644a9b">u</span><span style="font-weight:bold">*</span><span style="color:#644a9b">ls</span> <span style="color:#898887"># doesn't work, but ok</span>
- <span style="color:#bf0303">"ls"</span> /tmp/testtest <span style="color:#898887"># Quotes in commands are expanded</span>
- <span style="color:#0095ff;font-weight:bold">/us</span><span style="color:#bf0303">"r/bin"</span><span style="color:#0095ff;font-weight:bold">/xy/</span><span style="color:#644a9b">ls</span>
--<span style="color:#644a9b">abcd</span><span style="color:#bf0303;text-decoration:underline">$</span><span style="color:#644a9b">a</span> <span style="color:#898887"># show error</span>
-+<span style="color:#644a9b">abcd</span><span style="color:#0057ae">$a</span>
- <span style="color:#644a9b">other</span><span style="color:#bf0303;text-decoration:underline">)</span> abc <span style="color:#898887"># show error</span>
- <span style="color:#bf0303;text-decoration:underline"><</span>other abc <span style="color:#898887"># show error</span>
- <span style="color:#644a9b">other</span><span style="color:#ca60ca">></span> abc <span style="color:#898887"># ok</span>
- <span style="color:#644a9b">oth</span><span style="color:#ca60ca">></span>er abc <span style="color:#898887"># ok</span>
--<span style="color:#644a9b">ot</span><span style="color:#bf0303;text-decoration:underline">(</span><span style="color:#644a9b">her</span><span style="color:#bf0303;text-decoration:underline">)</span> abc <span style="color:#898887"># show error</span>
-+<span style="color:#644a9b">ot</span><span style="color:#bf0303;text-decoration:underline">(</span><span style="color:#644a9b">her</span><span style="color:#3daee9">)</span> abc <span style="color:#898887"># show error</span>
-
- <span style="color:#644a9b">-cmd</span>
- <span style="color:#644a9b">déjà-vu</span>
-@@ -57,6 +50,12 @@
- <span style="color:#644a9b">ls</span><span style="font-weight:bold">;</span><span style="color:#644a9b;font-weight:bold">echo</span> xy
- <span style="color:#644a9b">flex++</span>
- <span style="color:#644a9b;font-weight:bold">echo</span> [abc] abc
-+<span style="font-weight:bold">\</span>
-+<span style="font-weight:bold">\</span>
-+<span style="color:#644a9b">cmd</span>
-+
-+<span style="color:#644a9b">cmd</span><span style="font-weight:bold">\</span>
-+<span style="color:#644a9b">#cmd</span>
-
- <span style="color:#898887">#specials</span>
- <span style="color:#644a9b;font-weight:bold">command</span> -s <span style="color:#644a9b">ls</span>
-@@ -68,12 +67,10 @@
- <span style="color:#644a9b;font-weight:bold">set</span> <span style="color:#0057ae">test1</span><span style="color:#0057ae">[1..</span><span style="color:#0057ae">$n</span><span style="color:#0057ae">]</span> <span style="color:#0057ae">$test</span><span style="font-weight:bold">;</span> <span style="color:#644a9b;font-weight:bold">echo</span> <span style="color:#0057ae">$test1</span>
- <span style="color:#644a9b;font-weight:bold">set</span> <span style="color:#0057ae">test1</span><span style="color:#0057ae">[</span><span style="color:#0057ae">$n</span><span style="color:#0057ae">..1]</span> <span style="color:#0057ae">$test</span><span style="font-weight:bold">;</span> <span style="color:#644a9b;font-weight:bold">echo</span> <span style="color:#0057ae">$test1</span>
- <span style="color:#644a9b;font-weight:bold">set</span> <span style="color:#0057ae">test1</span><span style="color:#0057ae">[2..4 -2..-4]</span> <span style="color:#0057ae">$test1</span><span style="color:#0057ae">[4..2 -4..-2]</span><span style="font-weight:bold">;</span> <span style="color:#644a9b;font-weight:bold">echo</span> <span style="color:#0057ae">$test1</span>
--<span style="color:#644a9b;font-weight:bold">set</span> <span style="color:#0057ae">test1</span><span style="color:#0057ae">[2..4 -2..-4]</span>[1] <span style="color:#0057ae">$test1</span><span style="color:#0057ae">[4..2 -4..-2][1]</span>
--<span style="color:#898887"># ~~~ invalid</span>
-+<span style="color:#644a9b;font-weight:bold">set</span> <span style="color:#0057ae">test1</span><span style="color:#0057ae">[2..4 -2..-4][1]</span> <span style="color:#0057ae">$test1</span><span style="color:#0057ae">[4..2 -4..-2][1]</span>
- <span style="color:#644a9b;font-weight:bold">set</span> <span style="color:#0057ae">test1</span><span style="font-weight:bold">\</span>
- <span style="color:#0057ae">[2..4 -2..-4]</span><span style="font-weight:bold">\</span>
--[1] a
--<span style="color:#898887">#~~ invalid</span>
-+<span style="color:#0057ae">[1]</span> a
- <span style="color:#644a9b;font-weight:bold">set</span> <span style="color:#0057ae">test1</span> <span style="font-weight:bold">\</span>
- <span style="color:#898887">#bla bla</span>
- a b c
-@@ -86,16 +83,17 @@
- <span style="color:#644a9b;font-weight:bold">read</span> -gi <span style="color:#bf0303">"test"</span>
- <span style="color:#644a9b;font-weight:bold">read</span> -gi <span style="color:#3daee9">(</span><span style="color:#644a9b;font-weight:bold">echo</span> test<span style="color:#3daee9">)</span>
-
--<span style="color:#644a9b;font-weight:bold">set</span> <span style="color:#0057ae">x</span> <span style="color:#3daee9">(</span><span style="color:#644a9b;font-weight:bold">string</span> <span style="color:#644a9b;font-weight:bold">split</span> --max 1 --right / <span style="color:#3daee9">(</span><span style="color:#644a9b;font-weight:bold">status</span> current-filename<span style="color:#3daee9">)</span> <span style="color:#898887">#Comment test</span><span style="color:#3daee9">)</span>
-+<span style="color:#644a9b;font-weight:bold">set</span> <span style="color:#0057ae">x</span> <span style="color:#3daee9">(</span><span style="color:#644a9b;font-weight:bold">string</span> <span style="color:#644a9b;font-weight:bold">split</span> --max 1 --right / <span style="color:#3daee9">(</span><span style="color:#644a9b;font-weight:bold">status</span> current-filename<span style="color:#3daee9">)</span> <span style="color:#898887">#Comment test</span>
-+<span style="color:#3daee9">)</span>
- <span style="color:#644a9b;font-weight:bold">set</span> <span style="color:#0057ae">test</span> <span style="color:#3daee9">(</span><span style="color:#644a9b;font-weight:bold">exec</span> <span style="color:#0057ae">$cmd</span><span style="color:#3daee9">)</span>
-
- <span style="color:#898887"># direct path</span>
--<span style="color:#644a9b;font-weight:bold">test</span> <span style="color:#ca60ca">-d </span><span style="color:#0057ae">$tmpldir</span>/resources
-+<span style="color:#644a9b;font-weight:bold">test</span> <span style="color:#ca60ca">-d</span> <span style="color:#0057ae">$tmpldir</span>/resources
-
- <span style="color:#898887">### Options</span>
- <span style="color:#644a9b">cat</span> -l /usr/local/test<span style="color:#ca60ca">></span>logfile
- <span style="color:#644a9b">ls</span> --longopt<span style="color:#ca60ca">=</span>/test
--<span style="color:#644a9b">ls</span> -l<span style="color:#bf0303">"kasdflakjs"</span> -r/usr/test -x../test/../bla -z<span style="font-weight:bold">~xyz</span>/hello
-+<span style="color:#644a9b">ls</span> -l<span style="color:#bf0303">"kasdflakjs"</span> -r/usr/test -x../test/../bla -z~xyz/hello
-
- <span style="color:#898887">### Arguments</span>
- <span style="color:#644a9b;font-weight:bold">echo</span> abc<span style="color:#bf0303">"def"</span>ghi
-@@ -120,11 +118,11 @@
- <span style="color:#644a9b;font-weight:bold">test</span> .. abc
-
- <span style="color:#898887">### Escapes</span>
[suppressed due to size limit]
[suppressed due to size limit]
- <span style="color:#644a9b">touch</span> sdf<span style="font-weight:bold">\xa5</span>lh<span style="font-weight:bold">\Xb7</span>kll<span style="font-weight:bold">\157</span>j<span style="font-weight:bold">\15</span>8hk<span style="font-weight:bold">\ua47b</span>z<span style="font-weight:bold">\U123b5678</span>fs<span style="font-weight:bold">\cx</span>zdfga
-
- <span style="color:#644a9b">touch</span> <span style="color:#bf0303">"a\?bc\[\]a"</span> <span style="color:#898887"># no escaping in Quotes</span>
--<span style="color:#644a9b">touch</span> fgh\y1 <span style="color:#898887"># \y is no escape sequence in fish, show it as normal text like fish itself</span>
-+<span style="color:#644a9b">touch</span> fgh<span style="font-weight:bold">\</span>y1 <span style="color:#898887"># \y is no escape sequence in fish, show it as normal text like fish itself</span>
-
- <span style="color:#898887">### Builtins</span>
- <span style="color:#644a9b;font-weight:bold">. </span>hallo
-@@ -140,9 +138,10 @@
-
- <span style="color:#644a9b;font-weight:bold">true</span> <span style="font-weight:bold">;</span><span style="color:#644a9b">ls</span>
- <span style="color:#644a9b;font-weight:bold">echo</span> <span style="color:#3daee9">(</span><span style="color:#644a9b;font-weight:bold">true</span><span style="color:#3daee9">)</span>
--<span style="color:#644a9b;font-weight:bold">echo</span> <span style="color:#3daee9">(</span><span style="color:#644a9b;font-weight:bold">true</span> <span style="color:#898887">#comment</span><span style="color:#3daee9">)</span>
-+<span style="color:#644a9b;font-weight:bold">echo</span> <span style="color:#3daee9">(</span><span style="color:#644a9b;font-weight:bold">true</span> <span style="color:#898887">#comment)</span>
-+<span style="color:#644a9b">ls</span><span style="color:#3daee9">)</span>
- <span style="color:#644a9b;font-weight:bold">echo</span> <span style="color:#3daee9">(</span><span style="color:#644a9b;font-weight:bold">true</span><span style="color:#ca60ca">>></span>xyz/abc<span style="color:#3daee9">)</span>
--<span style="color:#644a9b;font-weight:bold">true</span> <span style="color:#bf0303;text-decoration:underline">-error </span><span style="color:#898887"># show error</span>
-+<span style="color:#644a9b;font-weight:bold">true</span> <span style="color:#bf0303;text-decoration:underline">-error</span> <span style="color:#898887"># show error</span>
- <span style="color:#644a9b;font-weight:bold">pwd</span> <span style="color:#ca60ca">></span> abc
-
- <span style="color:#644a9b;font-weight:bold">command</span> -s <span style="color:#644a9b">ls</span><span style="font-weight:bold">;</span><span style="color:#644a9b">cat</span> test
-@@ -168,53 +167,51 @@
- <span style="color:#0095ff;font-weight:bold">/usr/test/</span><span style="color:#644a9b">testtest</span> /usr/test/testtest
-
- <span style="color:#898887">### test</span>
--<span style="color:#644a9b;font-weight:bold">test</span> NUM1<span style="color:#ca60ca"> -eq </span>NUM2
--<span style="color:#644a9b;font-weight:bold">test</span> <span style="color:#ca60ca">-f </span>/tmp/abc <span style="color:#ca60ca">-a -e </span>/tmp/def<span style="font-weight:bold">;</span><span style="color:#644a9b">cat</span> /tmp/abc<span style="font-weight:bold">;</span>
-+<span style="color:#644a9b;font-weight:bold">test</span> NUM1 <span style="color:#ca60ca">-eq</span> NUM2
-+<span style="color:#644a9b;font-weight:bold">test</span> <span style="color:#ca60ca">-f</span> /tmp/abc <span style="color:#ca60ca">-a</span> <span style="color:#ca60ca">-e</span> /tmp/def<span style="font-weight:bold">;</span><span style="color:#644a9b">cat</span> /tmp/abc<span style="font-weight:bold">;</span>
-
--<span style="font-weight:bold">if</span> <span style="color:#644a9b;font-weight:bold">test</span> <span style="font-weight:bold">\(</span> <span style="color:#ca60ca">-f </span>/foo <span style="color:#ca60ca">-o -f </span>/bar <span style="font-weight:bold">\)</span> <span style="color:#ca60ca">-a </span><span style="font-weight:bold">\(</span> <span style="color:#ca60ca">-f </span>/baz <span style="color:#ca60ca">-o -f </span>/bat <span style="font-weight:bold">\)</span>
[suppressed due to size limit]
- <span style="color:#644a9b;font-weight:bold">echo</span> Success.
- <span style="font-weight:bold">end</span>
-
--<span style="color:#644a9b;font-weight:bold">[ </span>25<span style="color:#ca60ca"> -eq </span><span style="color:#0057ae">$NUM2</span><span style="color:#644a9b;font-weight:bold"> ]</span>
--<span style="color:#644a9b;font-weight:bold">[ </span><span style="color:#bf0303">"abc"</span> <span style="color:#ca60ca">=</span> <span style="color:#bf0303">"</span><span style="color:#0057ae">$STRING2</span><span style="color:#bf0303">"</span><span style="color:#644a9b;font-weight:bold"> ]</span>
-+<span style="color:#644a9b;font-weight:bold">[ </span>25 <span style="color:#ca60ca">-eq</span> <span style="color:#0057ae">$NUM2</span> <span style="color:#644a9b;font-weight:bold">]</span>
-+<span style="color:#644a9b;font-weight:bold">[ </span><span style="color:#bf0303">"abc"</span> <span style="color:#ca60ca">=</span> <span style="color:#bf0303">"</span><span style="color:#0057ae">$STRING2</span><span style="color:#bf0303">"</span> <span style="color:#644a9b;font-weight:bold">]</span>
-
--<span style="font-weight:bold">if</span> <span style="color:#644a9b;font-weight:bold">[ </span><span style="color:#ca60ca">!</span> <span style="font-weight:bold">\(</span>STRING1 <span style="color:#ca60ca">!=</span> STRING2<span style="font-weight:bold">\)</span><span style="color:#644a9b;font-weight:bold"> ]</span><span style="font-weight:bold">;</span><span style="color:#644a9b">ls</span><span style="font-weight:bold">;</span><span style="font-weight:bold">end</span>
--<span style="font-weight:bold">if</span> <span style="color:#644a9b;font-weight:bold">[ </span><span style="color:#ca60ca">-f </span>abc<span style="color:#644a9b;font-weight:bold"> ]</span><span style="color:#bf0303;text-decoration:underline">#</span> <span style="color:#bf0303;text-decoration:underline">show error</span>
-+<span style="font-weight:bold">if</span> <span style="color:#644a9b;font-weight:bold">[ </span><span style="color:#ca60ca">!</span> <span style="font-weight:bold">\(</span>STRING1 <span style="color:#ca60ca">!=</span> STRING2<span style="font-weight:bold">\)</span> <span style="color:#644a9b;font-weight:bold">]</span><span style="font-weight:bold">;</span><span style="color:#644a9b">ls</span><span style="font-weight:bold">;</span><span style="font-weight:bold">end</span>
-+<span style="font-weight:bold">if</span> <span style="color:#644a9b;font-weight:bold">[ </span><span style="color:#ca60ca">-f</span> abc ]# show error
- <span style="font-weight:bold">end</span>
--<span style="font-weight:bold">if</span> <span style="color:#644a9b;font-weight:bold">[ </span><span style="color:#ca60ca">-f </span>abc<span style="color:#644a9b;font-weight:bold"> ]</span> <span style="color:#898887"># ok</span>
-+<span style="font-weight:bold">if</span> <span style="color:#644a9b;font-weight:bold">[ </span><span style="color:#ca60ca">-f</span> abc <span style="color:#644a9b;font-weight:bold">]</span> <span style="color:#898887"># ok</span>
- <span style="font-weight:bold">end</span>
-
[suppressed due to size limit]
--<span style="font-weight:bold">if</span> <span style="color:#644a9b;font-weight:bold">[ </span><span style="color:#bf0303">"abc"</span> <span style="color:#ca60ca">!=</span> <span style="color:#bf0303">"def"</span><span style="color:#644a9b;font-weight:bold"> ]</span> <span style="color:#898887"># hallo</span>
[suppressed due to size limit]
-+<span style="font-weight:bold">if</span> <span style="color:#644a9b;font-weight:bold">[ </span><span style="color:#bf0303">"abc"</span> <span style="color:#ca60ca">!=</span> <span style="color:#bf0303">"def"</span> <span style="color:#644a9b;font-weight:bold">]</span> <span style="color:#898887"># hallo</span>
- <span style="color:#644a9b;font-weight:bold">echo</span> x<span style="font-weight:bold">;</span><span style="font-weight:bold">end</span>
-
- <span style="color:#898887">### Redirections</span>
--<span style="color:#644a9b">ls</span> <span style="color:#ca60ca"><</span> SOURCE_FILE <span style="color:#898887"># stdin</span>
--<span style="color:#644a9b">ls</span> <span style="color:#ca60ca">></span> DESTINATION <span style="color:#898887"># stdout</span>
--<span style="color:#644a9b">ls</span> <span style="color:#ca60ca">^</span> DESTINATION <span style="color:#898887"># stderr</span>
--<span style="color:#644a9b">ls</span> <span style="color:#ca60ca">>></span> DESTINATION_FILE <span style="color:#898887"># append</span>
--<span style="color:#644a9b">ls</span> <span style="color:#ca60ca">^^</span> DESTINATION_FILE <span style="color:#898887"># append</span>
--<span style="color:#644a9b">ls</span> <span style="color:#ca60ca">>?</span> DESTINATION <span style="color:#898887"># noclobber</span>
--<span style="color:#644a9b">ls</span> <span style="color:#ca60ca">^?</span> DESTINATION
--
--<span style="color:#644a9b">ls</span> <span style="color:#ca60ca">^?</span> <span style="font-weight:bold">~</span>
--<span style="color:#644a9b">ls</span> <span style="color:#ca60ca">^?</span> <span style="font-weight:bold">~testuser</span>/abc
--<span style="color:#644a9b">ls</span> <span style="color:#ca60ca">^?</span>/DESTINATION
--<span style="color:#644a9b">ls</span> <span style="color:#ca60ca">^?</span><span style="color:#bf0303;text-decoration:underline">#</span>DESTINATION <span style="color:#898887"># show error</span>
-+<span style="color:#644a9b">ls</span> <span style="color:#ca60ca"><</span> SOURCE_FILE <span style="color:#898887"># stdin</span>
-+<span style="color:#644a9b">ls</span> <span style="color:#ca60ca">></span> DESTINATION <span style="color:#898887"># stdout</span>
-+<span style="color:#644a9b">ls</span> <span style="color:#ca60ca">>></span> DESTINATION_FILE <span style="color:#898887"># append</span>
-+<span style="color:#644a9b">ls</span> <span style="color:#ca60ca">>?</span> DESTINATION <span style="color:#898887"># noclobber</span>
-+
-+<span style="color:#644a9b">ls</span> ^ DESTINATION <span style="color:#898887"># removed since 3.5.0 (released June 16, 2022)</span>
-+<span style="color:#644a9b">ls</span> ^^ DESTINATION_FILE <span style="color:#898887"># removed since 3.5.0 (released June 16, 2022)</span>
-+<span style="color:#644a9b">ls</span> ^<span style="font-weight:bold">?</span> DESTINATION <span style="color:#898887"># removed since 3.5.0 (released June 16, 2022)</span>
-
- <span style="color:#644a9b">ls</span> <span style="color:#ca60ca">></span> <span style="color:#0057ae">$abc</span><span style="color:#0057ae">[5]</span>
- <span style="color:#644a9b">ls</span> <span style="color:#ca60ca">></span><span style="color:#bf0303">"abc"</span>/defg<span style="color:#0057ae">$v</span>/xyz
-
--<span style="color:#644a9b">ls</span> <span style="color:#ca60ca">></span><span style="color:#bf0303;text-decoration:underline">&</span> <span style="color:#898887"># show error</span>
--<span style="color:#644a9b">ls</span> <span style="color:#ca60ca">></span> <span style="color:#bf0303;text-decoration:underline">&</span>1 <span style="color:#898887"># show error</span>
-+<span style="color:#644a9b">ls</span> <span style="color:#ca60ca">></span><span style="color:#bf0303;text-decoration:underline">&</span> <span style="color:#bf0303;text-decoration:underline">#</span><span style="color:#898887"> show error</span>
-+<span style="color:#644a9b">ls</span> <span style="color:#ca60ca">></span> <span style="color:#bf0303;text-decoration:underline">&</span><span style="color:#644a9b">1</span> <span style="color:#898887"># show error</span>
- <span style="color:#644a9b">ls</span> abc<span style="color:#ca60ca">>&25</span> xyz /tmp/xyz <span style="color:#0057ae">$abc</span>
--<span style="color:#644a9b">ls</span> /tmp/tst<span style="color:#ca60ca">>&25</span><span style="color:#bf0303;text-decoration:underline">?</span> <span style="color:#898887"># show error</span>
-+<span style="color:#644a9b">ls</span> /tmp/tst<span style="color:#ca60ca">>&25</span><span style="font-weight:bold">?</span> <span style="color:#898887"># show error</span>
- <span style="color:#644a9b">ls</span> /tmp/tst<span style="color:#ca60ca">>&25</span> <span style="font-weight:bold">?</span> <span style="color:#898887"># ok</span>
- <span style="color:#644a9b">ls</span> <span style="color:#ca60ca">3>&-</span> xyz
- <span style="color:#644a9b">ls</span> <span style="color:#ca60ca">1<</span>DESTINATION
--<span style="color:#644a9b;font-weight:bold">echo</span> Hello <span style="color:#ca60ca">></span> all_output.txt <span style="color:#ca60ca">^&1</span> xyz
-+<span style="color:#644a9b;font-weight:bold">echo</span> Hello <span style="color:#ca60ca">></span> all_output.txt <span style="color:#ca60ca">>?</span> xyz
- <span style="color:#644a9b">ls</span> <span style="color:#ca60ca">2>&-</span><span style="font-weight:bold">;</span><span style="color:#644a9b;font-weight:bold">echo</span> end
- <span style="color:#644a9b">ls</span> xyz <span style="color:#ca60ca">2>|</span><span style="color:#644a9b">cat</span>
-+<span style="color:#644a9b;font-weight:bold">echo</span> sd<span style="color:#bf0303">'ds'</span> <span style="color:#ca60ca">1>&2</span>
-+<span style="color:#644a9b;font-weight:bold">echo</span> sd<span style="color:#bf0303">'ds'</span>1<span style="color:#ca60ca">>&2</span>
-
- <span style="color:#644a9b">ls</span><span style="color:#ca60ca">></span>x
- <span style="color:#644a9b">abs</span><span style="color:#ca60ca">></span>x
-@@ -259,67 +256,66 @@
- <span style="color:#644a9b;font-weight:bold">echo</span> <span style="color:#0057ae">$$foo</span><span style="color:#0057ae">[1..-1]</span><span style="font-weight:bold">\</span>
- <span style="color:#0057ae">[5][2]</span><span style="font-weight:bold">\</span>
- <span style="color:#0057ae">[5]</span>
-+<span style="color:#644a9b;font-weight:bold">echo</span> <span style="color:#0057ae">$</span><span style="color:#bf0303;text-decoration:underline">$</span>
-+<span style="color:#644a9b;font-weight:bold">echo</span> <span style="color:#0057ae">$$$$</span><span style="color:#bf0303;text-decoration:underline">$</span>
-
- <span style="color:#898887">#show error</span>
--<span style="color:#644a9b;font-weight:bold">echo</span> <span style="color:#0057ae">$PATH</span><span style="color:#0057ae">[</span><span style="color:#bf0303;text-decoration:underline">error</span>
--<span style="color:#644a9b;font-weight:bold">echo</span> <span style="color:#0057ae">$PATH</span><span style="color:#0057ae">[1..</span><span style="color:#bf0303;text-decoration:underline">error</span><span style="color:#0057ae">]</span>
-+<span style="color:#644a9b;font-weight:bold">echo</span> <span style="color:#0057ae">$PATH</span><span style="color:#0057ae">[</span><span style="color:#bf0303;text-decoration:underline">e</span>rror
-+<span style="color:#644a9b;font-weight:bold">echo</span> <span style="color:#0057ae">$PATH</span><span style="color:#0057ae">[1..</span><span style="color:#bf0303;text-decoration:underline">e</span>rror]
-
--<span style="color:#644a9b;font-weight:bold">echo</span> <span style="color:#0057ae">$PATH</span><span style="color:#0057ae">[1 2 34</span> <span style="color:#0057ae">]</span>
-+<span style="color:#644a9b;font-weight:bold">echo</span> <span style="color:#0057ae">$PATH</span><span style="color:#0057ae">[1 2 34 ]</span>
- <span style="color:#644a9b;font-weight:bold">echo</span> <span style="color:#0057ae">$PATH</span><span style="color:#0057ae">[1.. 2]</span>
--<span style="color:#644a9b;font-weight:bold">echo</span> <span style="color:#0057ae">$PATH</span><span style="color:#0057ae">[1</span> <span style="color:#0057ae">..2]</span>
-+<span style="color:#644a9b;font-weight:bold">echo</span> <span style="color:#0057ae">$PATH</span><span style="color:#0057ae">[1 ..2]</span>
-
- <span style="color:#898887">### Brace Expansion</span>
- <span style="color:#644a9b;font-weight:bold">echo</span> input.<span style="color:#3daee9">{</span>c<span style="font-weight:bold">,</span>12h<span style="font-weight:bold">,</span>TXT<span style="color:#3daee9">}</span>
[suppressed due to size limit]
- <span style="color:#644a9b;font-weight:bold">echo</span> input.<span style="color:#3daee9">{</span>a<span style="color:#3daee9">{</span>b<span style="font-weight:bold">,</span>c<span style="color:#3daee9">}</span><span style="font-weight:bold">,</span>12h<span style="font-weight:bold">,</span>TXT<span style="color:#3daee9">}</span><span style="color:#bf0303;text-decoration:underline">}</span> <span style="color:#898887"># show error</span>
-
--
- <span style="color:#898887">### Index range expansion</span>
- <span style="color:#644a9b;font-weight:bold">echo</span> <span style="color:#3daee9">(</span><span style="color:#644a9b;font-weight:bold">echo</span> <span style="color:#0057ae">$a</span><span style="color:#3daee9">)</span><span style="color:#0057ae">[2..5]</span>
- <span style="color:#644a9b;font-weight:bold">echo</span> <span style="color:#3daee9">(</span><span style="color:#644a9b;font-weight:bold">echo</span> <span style="color:#0057ae">$a</span><span style="color:#3daee9">)</span><span style="color:#0057ae">[2..5 1..3]</span>
- <span style="color:#644a9b;font-weight:bold">echo</span> <span style="color:#3daee9">(</span><span style="color:#644a9b;font-weight:bold">echo</span> <span style="color:#0057ae">$a</span><span style="color:#3daee9">)</span><span style="color:#0057ae">[-1..1]</span>
-
- <span style="color:#898887">### Process expansion</span>
--<span style="color:#644a9b;font-weight:bold">fg</span> <span style="color:#3daee9">%</span><span style="color:#ff5500">ema</span> <span style="color:#898887"># ???</span>
--
-+<span style="color:#644a9b;font-weight:bold">echo</span> %ema <span style="color:#898887"># removed (expect %self) since 3.0b1 (released December 11, 2018)</span>
-+<span style="color:#644a9b;font-weight:bold">echo</span> %self <span style="color:#898887"># removed since 4.0.0 (released February 27, 2025)</span>
-
- <span style="color:#898887">### Command substitution</span>
[suppressed due to size limit]
-
--<span style="color:#644a9b;font-weight:bold">echo</span> <span style="color:#3daee9">(</span><span style="color:#898887">#hallo</span><span style="color:#3daee9">)</span>abc <span style="color:#898887"># ok</span>
--<span style="color:#644a9b;font-weight:bold">echo</span> <span style="color:#3daee9">(</span><span style="color:#644a9b">ls</span> <span style="color:#898887">#hallo</span><span style="color:#3daee9">)</span>abc <span style="color:#898887"># ok, die context-Tiefe ist anders</span>
--<span style="color:#644a9b;font-weight:bold">echo</span> <span style="color:#3daee9">(</span><span style="color:#644a9b">ls</span><span style="font-weight:bold">;</span><span style="color:#898887">#hallo</span><span style="color:#3daee9">)</span>abc <span style="color:#898887"># als hier.</span>
-+<span style="color:#644a9b;font-weight:bold">echo</span> <span style="color:#3daee9">(</span><span style="color:#898887">#hallo)abc</span>
-+<span style="color:#3daee9">)</span>
-+<span style="color:#644a9b;font-weight:bold">echo</span> <span style="color:#3daee9">(</span><span style="color:#644a9b">ls</span> <span style="color:#898887">#hallo)abc</span>
-+<span style="color:#3daee9">)</span>
-+<span style="color:#644a9b;font-weight:bold">echo</span> <span style="color:#3daee9">(</span><span style="color:#644a9b">ls</span><span style="font-weight:bold">;</span><span style="color:#898887">#hallo)abc</span>
-+<span style="color:#3daee9">)</span>
- <span style="color:#644a9b;font-weight:bold">echo</span> <span style="color:#3daee9">(</span><span style="color:#644a9b">ls#hallo</span><span style="color:#3daee9">)</span>abc <span style="color:#898887"># ok: # may be inner part of function names!</span>
- <span style="color:#644a9b;font-weight:bold">echo</span> <span style="color:#3daee9">(</span><span style="color:#0095ff;font-weight:bold">/usr/bin/</span><span style="color:#644a9b">ls</span><span style="color:#3daee9">)</span>
- <span style="color:#644a9b;font-weight:bold">echo</span> <span style="color:#3daee9">(</span><span style="color:#644a9b">ls</span> <span style="color:#ca60ca">>></span>mem/abc<span style="color:#3daee9">)</span>
- <span style="color:#644a9b;font-weight:bold">echo</span> <span style="color:#3daee9">(</span><span style="color:#644a9b;font-weight:bold">echo</span> <span style="color:#0057ae">$test</span><span style="color:#0057ae">[2]</span><span style="color:#3daee9">)</span>
- <span style="color:#644a9b;font-weight:bold">echo</span> <span style="color:#3daee9">(</span><span style="color:#0095ff;font-weight:bold">/usr</span><span style="color:#bf0303">"/bi"</span><span style="color:#0095ff;font-weight:bold">n/</span><span style="color:#644a9b">ls</span> /tmp<span style="color:#3daee9">)</span>
--<span style="color:#644a9b;font-weight:bold">echo</span> <span style="color:#3daee9">(</span><span style="color:#644a9b">seq</span> 10<span style="color:#3daee9">)</span><span style="color:#0057ae">[1]</span>[2]
-+<span style="color:#644a9b;font-weight:bold">echo</span> <span style="color:#3daee9">(</span><span style="color:#644a9b">seq</span> 10<span style="color:#3daee9">)</span><span style="color:#0057ae">[1][2]</span>
- <span style="color:#898887"># ~~~ not an index</span>
- <span style="color:#644a9b;font-weight:bold">echo</span> <span style="color:#3daee9">(</span><span style="color:#644a9b">seq</span> 10<span style="color:#3daee9">)</span><span style="font-weight:bold">\</span>
--<span style="color:#0057ae">[1]</span>[2]
-+<span style="color:#0057ae">[1][2]</span>
- <span style="color:#898887"># ~~~ not an index</span>
- <span style="color:#644a9b;font-weight:bold">echo</span> <span style="color:#3daee9">(</span><span style="color:#644a9b">seq</span> 10<span style="color:#3daee9">)</span><span style="font-weight:bold">\</span>
- <span style="color:#0057ae">[1]</span><span style="font-weight:bold">\</span>
--[2]
-+<span style="color:#0057ae">[2]</span>
- <span style="color:#898887">#~~ not an index</span>
-
- <span style="color:#898887"># multline command substitution</span>
- <span style="color:#644a9b;font-weight:bold">set</span> <span style="color:#0057ae">x</span> <span style="color:#3daee9">(</span><span style="color:#644a9b;font-weight:bold">echo</span> dirlist<span style="font-weight:bold">;</span> <span style="color:#898887"># blabla</span>
- <span style="color:#644a9b">ls</span><span style="color:#3daee9">)</span>
-
--<span style="color:#898887">## same, but commented out:</span>
--
--<span style="color:#898887"># set x (echo dirlist; # blabla</span>
--<span style="color:#898887"># ls)</span>
--
- <span style="color:#644a9b;font-weight:bold">set</span> <span style="color:#0057ae">pi</span> <span style="color:#3daee9">(</span><span style="color:#644a9b;font-weight:bold">math</span> <span style="color:#bf0303">"scale=10; 4*a(1)"</span><span style="color:#3daee9">)</span>
-
- <span style="color:#898887">### Continuation lines</span>
- <span style="color:#644a9b">ls</span> <span style="font-weight:bold">\</span>
- /usr/bin
-
--<span style="color:#644a9b;font-weight:bold">test</span> <span style="color:#bf0303">"STRING1"</span><span style="color:#ca60ca">=</span><span style="color:#bf0303">"STRING2"</span> <span style="color:#ca60ca">-a </span><span style="font-weight:bold">\</span>
-+<span style="color:#644a9b;font-weight:bold">test</span> <span style="color:#bf0303">"STRING1"</span>=<span style="color:#bf0303">"STRING2"</span> <span style="color:#ca60ca">-a</span> <span style="font-weight:bold">\</span>
- <span style="color:#bf0303">"STRING3"</span> <span style="color:#ca60ca">=</span> <span style="color:#3daee9">(</span><span style="color:#644a9b;font-weight:bold">echo</span> <span style="color:#bf0303">"STRING4"</span><span style="color:#3daee9">)</span>
-
- <span style="color:#644a9b;font-weight:bold">echo</span> input.<span style="color:#3daee9">{</span>abc<span style="font-weight:bold">\</span>
-@@ -336,7 +332,7 @@ TXT<span style="color:#3daee9">}</span>
- <span style="color:#644a9b;font-weight:bold">echo</span> <span style="color:#bf0303">"123456</span><span style="font-weight:bold">\</span>
- <span style="color:#bf0303"> 78910"</span>
- <span style="color:#644a9b;font-weight:bold">echo</span> <span style="color:#0057ae">$PATH</span><span style="color:#0057ae">[1..3</span><span style="font-weight:bold">\</span>
-- <span style="color:#0057ae">]</span>
-+<span style="color:#0057ae"> ]</span>
- <span style="color:#644a9b">ls</span> /usr<span style="font-weight:bold">\</span>
- local/bin
- <span style="color:#644a9b;font-weight:bold">echo</span> foo<span style="font-weight:bold">\ </span>bar
-@@ -400,7 +396,7 @@ bar
- <span style="color:#644a9b">diff</span> <span style="color:#3daee9">(</span><span style="color:#644a9b">sort</span> a.txt <span style="font-weight:bold">|</span> <span style="color:#644a9b;font-weight:bold">psub</span><span style="color:#3daee9">)</span> <span style="color:#3daee9">(</span><span style="color:#644a9b">sort</span> b.txt <span style="font-weight:bold">|</span> <span style="color:#644a9b;font-weight:bold">psub</span><span style="color:#3daee9">)</span>
- <span style="color:#644a9b">source-highlight</span> -f esc <span style="color:#3daee9">(</span><span style="color:#644a9b">cpp</span> main.c <span style="font-weight:bold">|</span> <span style="color:#644a9b;font-weight:bold">psub</span> -s .c<span style="color:#3daee9">)</span>
-
--<span style="font-weight:bold">while</span> <span style="color:#644a9b;font-weight:bold">test</span> <span style="color:#ca60ca">-f </span>foo.txt <span style="color:#898887"># comment</span>
-+<span style="font-weight:bold">while</span> <span style="color:#644a9b;font-weight:bold">test</span> <span style="color:#ca60ca">-f</span> foo.txt <span style="color:#898887"># comment</span>
- <span style="color:#644a9b;font-weight:bold">echo</span> hallo
- <span style="font-weight:bold">end</span>
-
-@@ -421,9 +417,9 @@ bar
-
- <span style="font-weight:bold">function</span> <span style="color:#644a9b">ls</span> --description=<span style="color:#607880">"Description"</span> -a a b c <span style="color:#898887"># comment</span>
- <span style="color:#644a9b;font-weight:bold">command</span> <span style="color:#644a9b">ls</span> --color<span style="color:#ca60ca">=</span>auto <span style="color:#0057ae">$argv</span>
-- <span style="font-weight:bold">if</span> <span style="color:#644a9b;font-weight:bold">test</span> <span style="color:#ca60ca">-f </span>foo.txt
-+ <span style="font-weight:bold">if</span> <span style="color:#644a9b;font-weight:bold">test</span> <span style="color:#ca60ca">-f</span> foo.txt
- <span style="color:#644a9b;font-weight:bold">echo</span> foo.txt exists
-- <span style="font-weight:bold">else</span> <span style="font-weight:bold">if</span> <span style="color:#644a9b;font-weight:bold">test</span> <span style="color:#ca60ca">-f </span>bar.txt <span style="color:#898887"># comment</span>
-+ <span style="font-weight:bold">else</span> <span style="font-weight:bold">if</span> <span style="color:#644a9b;font-weight:bold">test</span> <span style="color:#ca60ca">-f</span> bar.txt <span style="color:#898887"># comment</span>
- <span style="color:#644a9b;font-weight:bold">echo</span> bar.txt exists
- <span style="font-weight:bold">else</span>
- <span style="color:#644a9b;font-weight:bold">echo</span> foo.txt and bar.txt do not exist
-@@ -448,14 +444,14 @@ bar
- <span style="color:#644a9b;font-weight:bold">echo</span> <span style="color:#bf0303">"?"</span>
- <span style="font-weight:bold">end</span>
-
--<span style="font-weight:bold">if</span> <span style="font-weight:bold">not</span> <span style="color:#644a9b;font-weight:bold">test</span> <span style="color:#ca60ca">-f </span>spoon <span style="color:#898887">#comment</span>
-+<span style="font-weight:bold">if</span> <span style="font-weight:bold">not</span> <span style="color:#644a9b;font-weight:bold">test</span> <span style="color:#ca60ca">-f</span> spoon <span style="color:#898887">#comment</span>
- <span style="color:#644a9b;font-weight:bold">echo</span> There is no spoon
- <span style="font-weight:bold">else</span>
- <span style="color:#644a9b;font-weight:bold">exit</span> 1
- <span style="font-weight:bold">end</span>
-
- <span style="font-weight:bold">for</span> <span style="color:#0057ae">file</span> <span style="font-weight:bold">in</span> <span style="color:#0057ae">$cfgfiles</span>
-- <span style="font-weight:bold">if</span> <span style="color:#644a9b;font-weight:bold">test</span> <span style="color:#ca60ca">-f </span><span style="color:#0057ae">$file</span>
-+ <span style="font-weight:bold">if</span> <span style="color:#644a9b;font-weight:bold">test</span> <span style="color:#ca60ca">-f</span> <span style="color:#0057ae">$file</span>
[suppressed due to size limit]
- <span style="font-weight:bold">end</span>
- <span style="font-weight:bold">end</span> <span style="font-weight:bold">|</span> <span style="color:#644a9b">sort</span> -u <span style="font-weight:bold">|</span> <span style="color:#644a9b;font-weight:bold">string</span> <span style="color:#644a9b;font-weight:bold">match</span> -v Defaults
-@@ -463,7 +459,7 @@ bar
- <span style="font-weight:bold">for</span> <span style="color:#0057ae">i</span> <span style="font-weight:bold">in</span> <span style="font-weight:bold">*</span>.c
- <span style="font-weight:bold">if</span> <span style="color:#644a9b">grep</span> smurf <span style="color:#0057ae">$i</span> <span style="color:#898887"># comment</span>
- <span style="color:#644a9b;font-weight:bold">echo</span> Smurfs are present in <span style="color:#0057ae">$i</span>
-- <span style="color:#644a9b;font-weight:bold">break</span>
-+ <span style="font-weight:bold">break</span>
- <span style="font-weight:bold">end</span>
- <span style="font-weight:bold">end</span>
-
-@@ -476,13 +472,13 @@ bar
- <span style="font-weight:bold">begin</span> <span style="color:#898887"># comment</span>
- <span style="font-weight:bold">for</span> <span style="color:#0057ae">i</span> <span style="font-weight:bold">in</span> <span style="font-weight:bold">*</span>.tmp
- <span style="font-weight:bold">if</span> <span style="color:#644a9b">grep</span> smurf <span style="color:#0057ae">$i</span>
-- <span style="color:#644a9b;font-weight:bold">continue</span>
-+ <span style="font-weight:bold">continue</span>
- <span style="font-weight:bold">end</span>
- <span style="color:#644a9b">rm</span> <span style="color:#0057ae">$i</span>
- <span style="font-weight:bold">end</span>
- <span style="font-weight:bold">end</span>
-
--<span style="font-weight:bold">if</span> <span style="color:#644a9b;font-weight:bold">[ </span><span style="color:#0057ae">$status</span><span style="color:#ca60ca"> -eq </span>1<span style="color:#644a9b;font-weight:bold"> ]</span>
-+<span style="font-weight:bold">if</span> <span style="color:#644a9b;font-weight:bold">[ </span><span style="color:#0057ae">$status</span> <span style="color:#ca60ca">-eq</span> 1 <span style="color:#644a9b;font-weight:bold">]</span>
- <span style="color:#644a9b;font-weight:bold">set</span> <span style="color:#0057ae">sta</span> pass
- <span style="font-weight:bold">else</span>
- <span style="color:#644a9b;font-weight:bold">set</span> <span style="color:#0057ae">sta</span> fail
-@@ -493,7 +489,7 @@ bar
-
- <span style="color:#898887"># Process Expansion</span>
- <span style="color:#898887"># see fish issue 4230</span>
--<span style="color:#644a9b">kill</span> -STOP <span style="color:#3daee9">%</span><span style="color:#ff5500">self</span>
-+<span style="color:#644a9b">kill</span> -STOP %self
-
- <span style="color:#644a9b">endcmd</span> <span style="color:#898887"># is a command</span>
-
-diff --git a/autotests/input/highlight.fish b/autotests/input/highlight.fish
-index 1a22df744be40a253841ae4eb37f7da74af9b121..701832f706dd7f1024f915b87bf23969a2def286 100644
---- a/autotests/input/highlight.fish
-+++ b/autotests/input/highlight.fish
-@@ -4,13 +4,6 @@
- # fg sfg sfh sft
- # END
- #
--# text in (parenthesis) is ok, (even
--# over several lines)
--# escaped \) and \( are ok
--# an unbalanced single ) is not ok
--# This is due to fish comment handling in command substitutions
--# which cannot reasonably handled by kate syntax highlighting
--
-
- ### Commands and paths
- ls -l |sort
-@@ -32,7 +25,7 @@ usr/b?n/ls
- u*ls # doesn't work, but ok
- "ls" /tmp/testtest # Quotes in commands are expanded
- /us"r/bin"/xy/ls
--abcd$a # show error
-+abcd$a
- other) abc # show error
- <other abc # show error
- other> abc # ok
-@@ -51,6 +44,12 @@ ls/
- ls;echo xy
- flex++
- echo [abc] abc
-+\
-+\
-+cmd
-+
-+cmd\
-+#cmd
-
- #specials
- command -s ls
-@@ -63,11 +62,9 @@ set test1[1..$n] $test; echo $test1
- set test1[$n..1] $test; echo $test1
- set test1[2..4 -2..-4] $test1[4..2 -4..-2]; echo $test1
- set test1[2..4 -2..-4][1] $test1[4..2 -4..-2][1]
--# ~~~ invalid
- set test1\
- [2..4 -2..-4]\
- [1] a
--#~~ invalid
- set test1 \
- #bla bla
- a b c
-@@ -80,7 +77,8 @@ read -gi $test
- read -gi "test"
- read -gi (echo test)
-
--set x (string split --max 1 --right / (status current-filename) #Comment test)
-+set x (string split --max 1 --right / (status current-filename) #Comment test
-+)
- set test (exec $cmd)
-
- # direct path
-@@ -135,6 +133,7 @@ history merge
- true ;ls
- echo (true)
- echo (true #comment)
-+ls)
- echo (true>>xyz/abc)
- true -error # show error
- pwd > abc
-@@ -183,18 +182,14 @@ if [ "abc" != "def" ] # hallo
- echo x;end
-
- ### Redirections
--ls < SOURCE_FILE # stdin
--ls > DESTINATION # stdout
--ls ^ DESTINATION # stderr
--ls >> DESTINATION_FILE # append
--ls ^^ DESTINATION_FILE # append
--ls >? DESTINATION # noclobber
--ls ^? DESTINATION
--
--ls ^? ~
--ls ^? ~testuser/abc
--ls ^?/DESTINATION
--ls ^?#DESTINATION # show error
-+ls < SOURCE_FILE # stdin
-+ls > DESTINATION # stdout
-+ls >> DESTINATION_FILE # append
-+ls >? DESTINATION # noclobber
-+
-+ls ^ DESTINATION # removed since 3.5.0 (released June 16, 2022)
-+ls ^^ DESTINATION_FILE # removed since 3.5.0 (released June 16, 2022)
-+ls ^? DESTINATION # removed since 3.5.0 (released June 16, 2022)
-
- ls > $abc[5]
- ls >"abc"/defg$v/xyz
-@@ -206,9 +201,11 @@ ls /tmp/tst>&25? # show error
- ls /tmp/tst>&25 ? # ok
- ls 3>&- xyz
- ls 1<DESTINATION
--echo Hello > all_output.txt ^&1 xyz
-+echo Hello > all_output.txt >? xyz
- ls 2>&-;echo end
- ls xyz 2>|cat
-+echo sd'ds' 1>&2
-+echo sd'ds'1>&2
-
- ls>x
- abs>x
-@@ -253,6 +250,8 @@ echo $$foo[1..-1][5]
- echo $$foo[1..-1]\
- [5][2]\
- [5]
-+echo $$
-+echo $$$$$
-
- #show error
- echo $PATH[error
-@@ -267,22 +266,24 @@ echo input.{c,12h,TXT}
- echo input.{abc$test[(count $test)..1],(echo $txt)}
- echo input.{a{b,c},12h,TXT}} # show error
-
--
- ### Index range expansion
- echo (echo $a)[2..5]
- echo (echo $a)[2..5 1..3]
- echo (echo $a)[-1..1]
-
- ### Process expansion
--fg %ema # ???
--
-+echo %ema # removed (expect %self) since 3.0b1 (released December 11, 2018)
-+echo %self # removed since 4.0.0 (released February 27, 2025)
-
- ### Command substitution
- echo -n -s "$USER" @ "$__fish_prompt_hostname" ' ' (set_color $color_cwd) (/usr/bin/ls) (set_color normal)
-
--echo (#hallo)abc # ok
--echo (ls #hallo)abc # ok, die context-Tiefe ist anders
--echo (ls;#hallo)abc # als hier.
-+echo (#hallo)abc
-+)
-+echo (ls #hallo)abc
-+)
-+echo (ls;#hallo)abc
-+)
- echo (ls#hallo)abc # ok: # may be inner part of function names!
- echo (/usr/bin/ls)
- echo (ls >>mem/abc)
-@@ -302,11 +303,6 @@ echo (seq 10)\
- set x (echo dirlist; # blabla
- ls)
-
--## same, but commented out:
--
--# set x (echo dirlist; # blabla
--# ls)
--
- set pi (math "scale=10; 4*a(1)")
-
- ### Continuation lines
-diff --git a/autotests/reference/highlight.fish.ref b/autotests/reference/highlight.fish.ref
-index 02e4d40a9146f0511a8ce80a196c2fa8bc6292db..bbf3599f1f1bfdbf0f47eb801f09b78ca57a1eea 100644
---- a/autotests/reference/highlight.fish.ref
-+++ b/autotests/reference/highlight.fish.ref
-@@ -4,13 +4,6 @@
- <Comment># fg sfg sfh sft</Comment><br/>
- <Comment># </Comment><Region Marker>END</Region Marker><br/>
- <Comment>#</Comment><br/>
--<Comment># text in (parenthesis) is ok, (even</Comment><br/>
--<Comment># over several lines)</Comment><br/>
--<Comment># escaped \) and \( are ok</Comment><br/>
--<Comment># an unbalanced single </Comment><Error>)</Error><Normal Text> is not ok</Normal Text><br/>
--<Comment># This is due to fish comment handling in command substitutions</Comment><br/>
--<Comment># which cannot reasonably handled by kate syntax highlighting</Comment><br/>
--<Normal Text></Normal Text><br/>
- <Normal Text></Normal Text><br/>
- <Comment>### Commands and paths</Comment><br/>
- <UnixCommand>ls</UnixCommand><Normal Text> </Normal Text><Option>-l</Option><Normal Text> </Normal Text><Separator>|</Separator><UnixCommand>sort</UnixCommand><br/>
-@@ -27,17 +20,17 @@
- <CommandPath>/usr/bin/</CommandPath><Command>lsother</Command><br/>
- <CommandPath>../test/root/bin/</CommandPath><Command>fish</Command><Normal Text> </Normal Text><Option>-c</Option><Normal Text> </Normal Text><String DoubleQ>"echo </String DoubleQ><Variable>$t8</Variable><String DoubleQ>"</String DoubleQ><br/>
- <CommandPath>test/root/bin/</CommandPath><Command>fish</Command><Normal Text> </Normal Text><Option>-c</Option><Normal Text> </Normal Text><String DoubleQ>"echo </String DoubleQ><Variable>$t8</Variable><String DoubleQ>"</String DoubleQ><br/>
--<CommandPath>u?r/bin/</CommandPath><UnixCommand>ls</UnixCommand><br/>
--<CommandPath>usr/b?n/</CommandPath><UnixCommand>ls</UnixCommand><br/>
--<CommandPath>u*</CommandPath><UnixCommand>ls</UnixCommand><Normal Text> </Normal Text><Comment># doesn't work, but ok</Comment><br/>
-+<CommandPath>u</CommandPath><Glob>?</Glob><CommandPath>r/bin/</CommandPath><UnixCommand>ls</UnixCommand><br/>
-+<CommandPath>usr/b</CommandPath><Glob>?</Glob><CommandPath>n/</CommandPath><UnixCommand>ls</UnixCommand><br/>
-+<Command>u</Command><Glob>*</Glob><Command>ls</Command><Normal Text> </Normal Text><Comment># doesn't work, but ok</Comment><br/>
- <String DoubleQ>"ls"</String DoubleQ><Normal Text> </Normal Text><Path>/tmp/testtest</Path><Normal Text> </Normal Text><Comment># Quotes in commands are expanded</Comment><br/>
- <CommandPath>/us</CommandPath><String DoubleQ>"r/bin"</String DoubleQ><CommandPath>/xy/</CommandPath><UnixCommand>ls</UnixCommand><br/>
--<Command>abcd</Command><Error>$</Error><Command>a</Command><Normal Text> </Normal Text><Comment># show error</Comment><br/>
-+<Command>abcd</Command><Variable>$a</Variable><br/>
- <Command>other</Command><Error>)</Error><Normal Text> abc </Normal Text><Comment># show error</Comment><br/>
- <Error><</Error><Normal Text>other abc </Normal Text><Comment># show error</Comment><br/>
- <Command>other</Command><Redirection>></Redirection><Normal Text> </Normal Text><Path>abc</Path><Normal Text> </Normal Text><Comment># ok</Comment><br/>
- <Command>oth</Command><Redirection>></Redirection><Path>er</Path><Normal Text> abc </Normal Text><Comment># ok</Comment><br/>
--<Command>ot</Command><Error>(</Error><Command>her</Command><Error>)</Error><Normal Text> abc </Normal Text><Comment># show error</Comment><br/>
-+<Command>ot</Command><Error>(</Error><Command>her</Command><Keychar>)</Keychar><Normal Text> abc </Normal Text><Comment># show error</Comment><br/>
- <Normal Text></Normal Text><br/>
- <Command>-cmd</Command><br/>
- <Command>déjà-vu</Command><br/>
-@@ -51,6 +44,12 @@
- <UnixCommand>ls</UnixCommand><Separator>;</Separator><Builtin>echo</Builtin><Normal Text> xy</Normal Text><br/>
- <UnixCommand>flex++</UnixCommand><br/>
- <Builtin>echo</Builtin><Normal Text> [abc] abc</Normal Text><br/>
-+<Escape>\</Escape><br/>
-+<Escape>\</Escape><br/>
-+<Command>cmd</Command><br/>
-+<Normal Text></Normal Text><br/>
-+<Command>cmd</Command><Escape>\</Escape><br/>
-+<Command>#cmd</Command><br/>
- <Normal Text></Normal Text><br/>
- <Comment>#specials</Comment><br/>
- <Builtin>command</Builtin><Normal Text> </Normal Text><Option>-s</Option><Normal Text> </Normal Text><UnixCommand>ls</UnixCommand><br/>
-@@ -62,12 +61,10 @@
- <Builtin>set</Builtin><Normal Text> </Normal Text><Variable>test1</Variable><Index>[1..</Index><Variable>$n</Variable><Index>]</Index><Normal Text> </Normal Text><Variable>$test</Variable><Separator>;</Separator><Normal Text> </Normal Text><Builtin>echo</Builtin><Normal Text> </Normal Text><Variable>$test1</Variable><br/>
- <Builtin>set</Builtin><Normal Text> </Normal Text><Variable>test1</Variable><Index>[</Index><Variable>$n</Variable><Index>..1]</Index><Normal Text> </Normal Text><Variable>$test</Variable><Separator>;</Separator><Normal Text> </Normal Text><Builtin>echo</Builtin><Normal Text> </Normal Text><Variable>$test1</Variable><br/>
- <Builtin>set</Builtin><Normal Text> </Normal Text><Variable>test1</Variable><Index>[2..4 -2..-4]</Index><Normal Text> </Normal Text><Variable>$test1</Variable><Index>[4..2 -4..-2]</Index><Separator>;</Separator><Normal Text> </Normal Text><Builtin>echo</Builtin><Normal Text> </Normal Text><Variable>$test1</Variable><br/>
--<Builtin>set</Builtin><Normal Text> </Normal Text><Variable>test1</Variable><Index>[2..4 -2..-4]</Index><Normal Text>[1] </Normal Text><Variable>$test1</Variable><Index>[4..2 -4..-2][1]</Index><br/>
--<Comment># ~~~ invalid</Comment><br/>
-+<Builtin>set</Builtin><Normal Text> </Normal Text><Variable>test1</Variable><Index>[2..4 -2..-4][1]</Index><Normal Text> </Normal Text><Variable>$test1</Variable><Index>[4..2 -4..-2][1]</Index><br/>
- <Builtin>set</Builtin><Normal Text> </Normal Text><Variable>test1</Variable><Escape>\</Escape><br/>
- <Index>[2..4 -2..-4]</Index><Escape>\</Escape><br/>
--<Normal Text>[1] a</Normal Text><br/>
--<Comment>#~~ invalid</Comment><br/>
-+<Index>[1]</Index><Normal Text> a</Normal Text><br/>
- <Builtin>set</Builtin><Normal Text> </Normal Text><Variable>test1</Variable><Normal Text> </Normal Text><Escape>\</Escape><br/>
- <Normal Text> </Normal Text><Comment>#bla bla</Comment><br/>
- <Normal Text> a b c</Normal Text><br/>
-@@ -80,16 +77,17 @@
- <Builtin>read</Builtin><Normal Text> </Normal Text><Option>-gi</Option><Normal Text> </Normal Text><String DoubleQ>"test"</String DoubleQ><br/>
- <Builtin>read</Builtin><Normal Text> </Normal Text><Option>-gi</Option><Normal Text> </Normal Text><Keychar>(</Keychar><Builtin>echo</Builtin><Normal Text> test</Normal Text><Keychar>)</Keychar><br/>
- <Normal Text></Normal Text><br/>
[suppressed due to size limit]
[suppressed due to size limit]
-+<Keychar>)</Keychar><br/>
- <Builtin>set</Builtin><Normal Text> </Normal Text><Variable>test</Variable><Normal Text> </Normal Text><Keychar>(</Keychar><Builtin>exec</Builtin><Normal Text> </Normal Text><Variable>$cmd</Variable><Keychar>)</Keychar><br/>
- <Normal Text></Normal Text><br/>
- <Comment># direct path</Comment><br/>
--<Builtin>test</Builtin><Normal Text> </Normal Text><Operator>-d </Operator><Variable>$tmpldir</Variable><Path>/resources</Path><br/>
-+<Builtin>test</Builtin><Normal Text> </Normal Text><Operator>-d</Operator><Normal Text> </Normal Text><Variable>$tmpldir</Variable><Path>/resources</Path><br/>
- <Normal Text></Normal Text><br/>
- <Comment>### Options</Comment><br/>
- <UnixCommand>cat</UnixCommand><Normal Text> </Normal Text><Option>-l</Option><Normal Text> </Normal Text><Path>/usr/local/test</Path><Redirection>></Redirection><Path>logfile</Path><br/>
- <UnixCommand>ls</UnixCommand><Normal Text> </Normal Text><Option>--longopt</Option><Operator>=</Operator><Path>/test</Path><br/>
--<UnixCommand>ls</UnixCommand><Normal Text> </Normal Text><Option>-l</Option><String DoubleQ>"kasdflakjs"</String DoubleQ><Normal Text> </Normal Text><Option>-r</Option><Path>/usr/test</Path><Normal Text> </Normal Text><Option>-x</Option><Path>../test/../bla</Path><Normal Text> </Normal Text><Option>-z</Option><HomeDir>~xyz</HomeDir><Path>/hello</Path><br/>
-+<UnixCommand>ls</UnixCommand><Normal Text> </Normal Text><Option>-l</Option><String DoubleQ>"kasdflakjs"</String DoubleQ><Normal Text> </Normal Text><Option>-r</Option><Path>/usr/test</Path><Normal Text> </Normal Text><Option>-x</Option><Path>../test/../bla</Path><Normal Text> </Normal Text><Option>-z</Option><Path>~xyz/hello</Path><br/>
- <Normal Text></Normal Text><br/>
- <Comment>### Arguments</Comment><br/>
- <Builtin>echo</Builtin><Normal Text> abc</Normal Text><String DoubleQ>"def"</String DoubleQ><Normal Text>ghi</Normal Text><br/>
-@@ -114,11 +112,11 @@
- <Builtin>test</Builtin><Normal Text> </Normal Text><Path>..</Path><Normal Text> abc</Normal Text><br/>
- <Normal Text></Normal Text><br/>
- <Comment>### Escapes</Comment><br/>
[suppressed due to size limit]
[suppressed due to size limit]
- <UnixCommand>touch</UnixCommand><Normal Text> sdf</Normal Text><Escape>\xa5</Escape><Normal Text>lh</Normal Text><Escape>\Xb7</Escape><Normal Text>kll</Normal Text><Escape>\157</Escape><Normal Text>j</Normal Text><Escape>\15</Escape><Normal Text>8hk</Normal Text><Escape>\ua47b</Escape><Normal Text>z</Normal Text><Escape>\U123b5678</Escape><Normal Text>fs</Normal Text><Escape>\cx</Escape><Normal Text>zdfga</Normal Text><br/>
- <Normal Text></Normal Text><br/>
- <UnixCommand>touch</UnixCommand><Normal Text> </Normal Text><String DoubleQ>"a\?bc\[\]a"</String DoubleQ><Normal Text> </Normal Text><Comment># no escaping in Quotes</Comment><br/>
--<UnixCommand>touch</UnixCommand><Normal Text> fgh\y1 </Normal Text><Comment># \y is no escape sequence in fish, show it as normal text like fish itself</Comment><br/>
-+<UnixCommand>touch</UnixCommand><Normal Text> fgh</Normal Text><Escape>\</Escape><Normal Text>y1 </Normal Text><Comment># \y is no escape sequence in fish, show it as normal text like fish itself</Comment><br/>
- <Normal Text></Normal Text><br/>
- <Comment>### Builtins</Comment><br/>
- <Builtin>. </Builtin><Normal Text>hallo</Normal Text><br/>
-@@ -134,9 +132,10 @@
- <Normal Text></Normal Text><br/>
- <Builtin>true</Builtin><Normal Text> </Normal Text><Separator>;</Separator><UnixCommand>ls</UnixCommand><br/>
- <Builtin>echo</Builtin><Normal Text> </Normal Text><Keychar>(</Keychar><Builtin>true</Builtin><Keychar>)</Keychar><br/>
--<Builtin>echo</Builtin><Normal Text> </Normal Text><Keychar>(</Keychar><Builtin>true</Builtin><Normal Text> </Normal Text><Comment>#comment</Comment><Keychar>)</Keychar><br/>
-+<Builtin>echo</Builtin><Normal Text> </Normal Text><Keychar>(</Keychar><Builtin>true</Builtin><Normal Text> </Normal Text><Comment>#comment)</Comment><br/>
-+<UnixCommand>ls</UnixCommand><Keychar>)</Keychar><br/>
- <Builtin>echo</Builtin><Normal Text> </Normal Text><Keychar>(</Keychar><Builtin>true</Builtin><Redirection>>></Redirection><Path>xyz/abc</Path><Keychar>)</Keychar><br/>
--<Builtin>true</Builtin><Normal Text> </Normal Text><Error>-error </Error><Comment># show error</Comment><br/>
-+<Builtin>true</Builtin><Normal Text> </Normal Text><Error>-error</Error><Normal Text> </Normal Text><Comment># show error</Comment><br/>
- <Builtin>pwd</Builtin><Normal Text> </Normal Text><Redirection>></Redirection><Normal Text> </Normal Text><Path>abc</Path><br/>
- <Normal Text></Normal Text><br/>
- <Builtin>command</Builtin><Normal Text> </Normal Text><Option>-s</Option><Normal Text> </Normal Text><UnixCommand>ls</UnixCommand><Separator>;</Separator><UnixCommand>cat</UnixCommand><Normal Text> test</Normal Text><br/>
-@@ -162,53 +161,51 @@
- <CommandPath>/usr/test/</CommandPath><Command>testtest</Command><Normal Text> </Normal Text><Path>/usr/test/testtest</Path><br/>
- <Normal Text></Normal Text><br/>
- <Comment>### test</Comment><br/>
--<Builtin>test</Builtin><Normal Text> NUM1</Normal Text><Operator> -eq </Operator><Normal Text>NUM2</Normal Text><br/>
--<Builtin>test</Builtin><Normal Text> </Normal Text><Operator>-f </Operator><Path>/tmp/abc</Path><Normal Text> </Normal Text><Operator>-a -e </Operator><Path>/tmp/def</Path><Separator>;</Separator><UnixCommand>cat</UnixCommand><Normal Text> </Normal Text><Path>/tmp/abc</Path><Separator>;</Separator><br/>
-+<Builtin>test</Builtin><Normal Text> NUM1 </Normal Text><Operator>-eq</Operator><Normal Text> NUM2</Normal Text><br/>
-+<Builtin>test</Builtin><Normal Text> </Normal Text><Operator>-f</Operator><Normal Text> </Normal Text><Path>/tmp/abc</Path><Normal Text> </Normal Text><Operator>-a</Operator><Normal Text> </Normal Text><Operator>-e</Operator><Normal Text> </Normal Text><Path>/tmp/def</Path><Separator>;</Separator><UnixCommand>cat</UnixCommand><Normal Text> </Normal Text><Path>/tmp/abc</Path><Separator>;</Separator><br/>
- <Normal Text></Normal Text><br/>
[suppressed due to size limit]
--<Normal Text> </Normal Text><Builtin>echo</Builtin><Normal Text> Success</Normal Text><Path>.</Path><br/>
[suppressed due to size limit]
-+<Normal Text> </Normal Text><Builtin>echo</Builtin><Normal Text> Success.</Normal Text><br/>
- <Control Flow>end</Control Flow><br/>
- <Normal Text></Normal Text><br/>
--<Builtin>[ </Builtin><Normal Text>25</Normal Text><Operator> -eq </Operator><Variable>$NUM2</Variable><Builtin> ]</Builtin><br/>
--<Builtin>[ </Builtin><String DoubleQ>"abc"</String DoubleQ><Normal Text> </Normal Text><Operator>=</Operator><Normal Text> </Normal Text><String DoubleQ>"</String DoubleQ><Variable>$STRING2</Variable><String DoubleQ>"</String DoubleQ><Builtin> ]</Builtin><br/>
-+<Builtin>[ </Builtin><Normal Text>25 </Normal Text><Operator>-eq</Operator><Normal Text> </Normal Text><Variable>$NUM2</Variable><Normal Text> </Normal Text><Builtin>]</Builtin><br/>
-+<Builtin>[ </Builtin><String DoubleQ>"abc"</String DoubleQ><Normal Text> </Normal Text><Operator>=</Operator><Normal Text> </Normal Text><String DoubleQ>"</String DoubleQ><Variable>$STRING2</Variable><String DoubleQ>"</String DoubleQ><Normal Text> </Normal Text><Builtin>]</Builtin><br/>
- <Normal Text></Normal Text><br/>
--<Control Flow>if</Control Flow><Normal Text> </Normal Text><Builtin>[ </Builtin><Operator>!</Operator><Normal Text> </Normal Text><Escape>\(</Escape><Normal Text>STRING1 </Normal Text><Operator>!=</Operator><Normal Text> STRING2</Normal Text><Escape>\)</Escape><Builtin> ]</Builtin><Separator>;</Separator><UnixCommand>ls</UnixCommand><Separator>;</Separator><Control Flow>end</Control Flow><br/>
--<Control Flow>if</Control Flow><Normal Text> </Normal Text><Builtin>[ </Builtin><Operator>-f </Operator><Path>abc</Path><Builtin> ]</Builtin><Error>#</Error><Normal Text> </Normal Text><Error>show error</Error><br/>
-+<Control Flow>if</Control Flow><Normal Text> </Normal Text><Builtin>[ </Builtin><Operator>!</Operator><Normal Text> </Normal Text><Escape>\(</Escape><Normal Text>STRING1 </Normal Text><Operator>!=</Operator><Normal Text> STRING2</Normal Text><Escape>\)</Escape><Normal Text> </Normal Text><Builtin>]</Builtin><Separator>;</Separator><UnixCommand>ls</UnixCommand><Separator>;</Separator><Control Flow>end</Control Flow><br/>
-+<Control Flow>if</Control Flow><Normal Text> </Normal Text><Builtin>[ </Builtin><Operator>-f</Operator><Normal Text> </Normal Text><Path>abc</Path><Normal Text> ]# show error</Normal Text><br/>
- <Control Flow>end</Control Flow><br/>
--<Control Flow>if</Control Flow><Normal Text> </Normal Text><Builtin>[ </Builtin><Operator>-f </Operator><Path>abc</Path><Builtin> ]</Builtin><Normal Text> </Normal Text><Comment># ok</Comment><br/>
-+<Control Flow>if</Control Flow><Normal Text> </Normal Text><Builtin>[ </Builtin><Operator>-f</Operator><Normal Text> </Normal Text><Path>abc</Path><Normal Text> </Normal Text><Builtin>]</Builtin><Normal Text> </Normal Text><Comment># ok</Comment><br/>
- <Control Flow>end</Control Flow><br/>
- <Normal Text></Normal Text><br/>
--<Control Flow>if</Control Flow><Normal Text> </Normal Text><Builtin>[ </Builtin><Operator>!</Operator><Normal Text> </Normal Text><Escape>\(</Escape><Normal Text>STRING1 </Normal Text><Operator>!=</Operator><Normal Text> STRING2</Normal Text><Escape>\)</Escape><Builtin> ]</Builtin><Normal Text> </Normal Text><Error>ls</Error><Separator>;</Separator><Control Flow>end</Control Flow><Normal Text> </Normal Text><Comment># show error</Comment><br/>
--<Control Flow>if</Control Flow><Normal Text> </Normal Text><Builtin>[ </Builtin><String DoubleQ>"abc"</String DoubleQ><Normal Text> </Normal Text><Operator>!=</Operator><Normal Text> </Normal Text><String DoubleQ>"def"</String DoubleQ><Builtin> ]</Builtin><Normal Text> </Normal Text><Comment># hallo</Comment><br/>
-+<Control Flow>if</Control Flow><Normal Text> </Normal Text><Builtin>[ </Builtin><Operator>!</Operator><Normal Text> </Normal Text><Escape>\(</Escape><Normal Text>STRING1 </Normal Text><Operator>!=</Operator><Normal Text> STRING2</Normal Text><Escape>\)</Escape><Normal Text> </Normal Text><Builtin>]</Builtin><Normal Text> </Normal Text><Error>ls</Error><Separator>;</Separator><Control Flow>end</Control Flow><Normal Text> </Normal Text><Comment># show error</Comment><br/>
-+<Control Flow>if</Control Flow><Normal Text> </Normal Text><Builtin>[ </Builtin><String DoubleQ>"abc"</String DoubleQ><Normal Text> </Normal Text><Operator>!=</Operator><Normal Text> </Normal Text><String DoubleQ>"def"</String DoubleQ><Normal Text> </Normal Text><Builtin>]</Builtin><Normal Text> </Normal Text><Comment># hallo</Comment><br/>
- <Normal Text> </Normal Text><Builtin>echo</Builtin><Normal Text> x</Normal Text><Separator>;</Separator><Control Flow>end</Control Flow><br/>
- <Normal Text></Normal Text><br/>
- <Comment>### Redirections</Comment><br/>
--<UnixCommand>ls</UnixCommand><Normal Text> </Normal Text><Redirection><</Redirection><Normal Text> </Normal Text><Path>SOURCE_FILE</Path><Normal Text> </Normal Text><Comment># stdin</Comment><br/>
--<UnixCommand>ls</UnixCommand><Normal Text> </Normal Text><Redirection>></Redirection><Normal Text> </Normal Text><Path>DESTINATION</Path><Normal Text> </Normal Text><Comment># stdout</Comment><br/>
--<UnixCommand>ls</UnixCommand><Normal Text> </Normal Text><Redirection>^</Redirection><Normal Text> </Normal Text><Path>DESTINATION</Path><Normal Text> </Normal Text><Comment># stderr</Comment><br/>
--<UnixCommand>ls</UnixCommand><Normal Text> </Normal Text><Redirection>>></Redirection><Normal Text> </Normal Text><Path>DESTINATION_FILE</Path><Normal Text> </Normal Text><Comment># append</Comment><br/>
--<UnixCommand>ls</UnixCommand><Normal Text> </Normal Text><Redirection>^^</Redirection><Normal Text> </Normal Text><Path>DESTINATION_FILE</Path><Normal Text> </Normal Text><Comment># append</Comment><br/>
--<UnixCommand>ls</UnixCommand><Normal Text> </Normal Text><Redirection>>?</Redirection><Normal Text> </Normal Text><Path>DESTINATION</Path><Normal Text> </Normal Text><Comment># noclobber</Comment><br/>
--<UnixCommand>ls</UnixCommand><Normal Text> </Normal Text><Redirection>^?</Redirection><Normal Text> </Normal Text><Path>DESTINATION</Path><br/>
--<Normal Text></Normal Text><br/>
--<UnixCommand>ls</UnixCommand><Normal Text> </Normal Text><Redirection>^?</Redirection><Normal Text> </Normal Text><HomeDir>~</HomeDir><br/>
--<UnixCommand>ls</UnixCommand><Normal Text> </Normal Text><Redirection>^?</Redirection><Normal Text> </Normal Text><HomeDir>~testuser</HomeDir><Path>/abc</Path><br/>
--<UnixCommand>ls</UnixCommand><Normal Text> </Normal Text><Redirection>^?</Redirection><Path>/DESTINATION</Path><br/>
--<UnixCommand>ls</UnixCommand><Normal Text> </Normal Text><Redirection>^?</Redirection><Error>#</Error><Normal Text>DESTINATION </Normal Text><Comment># show error</Comment><br/>
-+<UnixCommand>ls</UnixCommand><Normal Text> </Normal Text><Redirection><</Redirection><Normal Text> </Normal Text><Path>SOURCE_FILE</Path><Normal Text> </Normal Text><Comment># stdin</Comment><br/>
-+<UnixCommand>ls</UnixCommand><Normal Text> </Normal Text><Redirection>></Redirection><Normal Text> </Normal Text><Path>DESTINATION</Path><Normal Text> </Normal Text><Comment># stdout</Comment><br/>
-+<UnixCommand>ls</UnixCommand><Normal Text> </Normal Text><Redirection>>></Redirection><Normal Text> </Normal Text><Path>DESTINATION_FILE</Path><Normal Text> </Normal Text><Comment># append</Comment><br/>
-+<UnixCommand>ls</UnixCommand><Normal Text> </Normal Text><Redirection>>?</Redirection><Normal Text> </Normal Text><Path>DESTINATION</Path><Normal Text> </Normal Text><Comment># noclobber</Comment><br/>
-+<Normal Text></Normal Text><br/>
-+<UnixCommand>ls</UnixCommand><Normal Text> ^ DESTINATION </Normal Text><Comment># removed since 3.5.0 (released June 16, 2022)</Comment><br/>
-+<UnixCommand>ls</UnixCommand><Normal Text> ^^ DESTINATION_FILE </Normal Text><Comment># removed since 3.5.0 (released June 16, 2022)</Comment><br/>
-+<UnixCommand>ls</UnixCommand><Normal Text> </Normal Text><Path>^</Path><Glob>?</Glob><Normal Text> DESTINATION </Normal Text><Comment># removed since 3.5.0 (released June 16, 2022)</Comment><br/>
- <Normal Text></Normal Text><br/>
- <UnixCommand>ls</UnixCommand><Normal Text> </Normal Text><Redirection>></Redirection><Normal Text> </Normal Text><Variable>$abc</Variable><Index>[5]</Index><br/>
- <UnixCommand>ls</UnixCommand><Normal Text> </Normal Text><Redirection>></Redirection><String DoubleQ>"abc"</String DoubleQ><Path>/defg</Path><Variable>$v</Variable><Path>/xyz</Path><br/>
- <Normal Text></Normal Text><br/>
--<UnixCommand>ls</UnixCommand><Normal Text> </Normal Text><Redirection>></Redirection><Error>&</Error><Normal Text> </Normal Text><Comment># show error</Comment><br/>
--<UnixCommand>ls</UnixCommand><Normal Text> </Normal Text><Redirection>></Redirection><Normal Text> </Normal Text><Error>&</Error><Normal Text>1 </Normal Text><Comment># show error</Comment><br/>
-+<UnixCommand>ls</UnixCommand><Normal Text> </Normal Text><Redirection>></Redirection><Error>&</Error><Normal Text> </Normal Text><Error>#</Error><Comment> show error</Comment><br/>
-+<UnixCommand>ls</UnixCommand><Normal Text> </Normal Text><Redirection>></Redirection><Normal Text> </Normal Text><Error>&</Error><Command>1</Command><Normal Text> </Normal Text><Comment># show error</Comment><br/>
- <UnixCommand>ls</UnixCommand><Normal Text> abc</Normal Text><Redirection>>&25</Redirection><Normal Text> xyz </Normal Text><Path>/tmp/xyz</Path><Normal Text> </Normal Text><Variable>$abc</Variable><br/>
--<UnixCommand>ls</UnixCommand><Normal Text> </Normal Text><Path>/tmp/tst</Path><Redirection>>&25</Redirection><Error>?</Error><Normal Text> </Normal Text><Comment># show error</Comment><br/>
-+<UnixCommand>ls</UnixCommand><Normal Text> </Normal Text><Path>/tmp/tst</Path><Redirection>>&25</Redirection><Glob>?</Glob><Normal Text> </Normal Text><Comment># show error</Comment><br/>
- <UnixCommand>ls</UnixCommand><Normal Text> </Normal Text><Path>/tmp/tst</Path><Redirection>>&25</Redirection><Normal Text> </Normal Text><Glob>?</Glob><Normal Text> </Normal Text><Comment># ok</Comment><br/>
- <UnixCommand>ls</UnixCommand><Normal Text> </Normal Text><Redirection>3>&-</Redirection><Normal Text> xyz</Normal Text><br/>
- <UnixCommand>ls</UnixCommand><Normal Text> </Normal Text><Redirection>1<</Redirection><Path>DESTINATION</Path><br/>
--<Builtin>echo</Builtin><Normal Text> Hello </Normal Text><Redirection>></Redirection><Normal Text> </Normal Text><Path>all_output.txt</Path><Normal Text> </Normal Text><Redirection>^&1</Redirection><Normal Text> xyz</Normal Text><br/>
-+<Builtin>echo</Builtin><Normal Text> Hello </Normal Text><Redirection>></Redirection><Normal Text> </Normal Text><Path>all_output.txt</Path><Normal Text> </Normal Text><Redirection>>?</Redirection><Normal Text> </Normal Text><Path>xyz</Path><br/>
- <UnixCommand>ls</UnixCommand><Normal Text> </Normal Text><Redirection>2>&-</Redirection><Separator>;</Separator><Builtin>echo</Builtin><Normal Text> end</Normal Text><br/>
- <UnixCommand>ls</UnixCommand><Normal Text> xyz </Normal Text><Redirection>2>|</Redirection><UnixCommand>cat</UnixCommand><br/>
-+<Builtin>echo</Builtin><Normal Text> sd</Normal Text><String SingleQ>'ds'</String SingleQ><Normal Text> </Normal Text><Redirection>1>&2</Redirection><br/>
-+<Builtin>echo</Builtin><Normal Text> sd</Normal Text><String SingleQ>'ds'</String SingleQ><Normal Text>1</Normal Text><Redirection>>&2</Redirection><br/>
- <Normal Text></Normal Text><br/>
- <UnixCommand>ls</UnixCommand><Redirection>></Redirection><Path>x</Path><br/>
- <Command>abs</Command><Redirection>></Redirection><Path>x</Path><br/>
-@@ -253,67 +250,66 @@
- <Builtin>echo</Builtin><Normal Text> </Normal Text><Variable>$$foo</Variable><Index>[1..-1]</Index><Escape>\</Escape><br/>
- <Index>[5][2]</Index><Escape>\</Escape><br/>
- <Index>[5]</Index><br/>
-+<Builtin>echo</Builtin><Normal Text> </Normal Text><Variable>$</Variable><Error>$</Error><br/>
-+<Builtin>echo</Builtin><Normal Text> </Normal Text><Variable>$$$$</Variable><Error>$</Error><br/>
- <Normal Text></Normal Text><br/>
- <Normal Text> </Normal Text><Comment>#show error</Comment><br/>
--<Builtin>echo</Builtin><Normal Text> </Normal Text><Variable>$PATH</Variable><Index>[</Index><Error>error</Error><br/>
--<Builtin>echo</Builtin><Normal Text> </Normal Text><Variable>$PATH</Variable><Index>[1..</Index><Error>error</Error><Index>]</Index><br/>
-+<Builtin>echo</Builtin><Normal Text> </Normal Text><Variable>$PATH</Variable><Index>[</Index><Error>e</Error><Normal Text>rror</Normal Text><br/>
-+<Builtin>echo</Builtin><Normal Text> </Normal Text><Variable>$PATH</Variable><Index>[1..</Index><Error>e</Error><Normal Text>rror]</Normal Text><br/>
- <Normal Text></Normal Text><br/>
--<Builtin>echo</Builtin><Normal Text> </Normal Text><Variable>$PATH</Variable><Index>[1 2 34</Index><Normal Text> </Normal Text><Index>]</Index><br/>
-+<Builtin>echo</Builtin><Normal Text> </Normal Text><Variable>$PATH</Variable><Index>[1 2 34 ]</Index><br/>
- <Builtin>echo</Builtin><Normal Text> </Normal Text><Variable>$PATH</Variable><Index>[1.. 2]</Index><br/>
--<Builtin>echo</Builtin><Normal Text> </Normal Text><Variable>$PATH</Variable><Index>[1</Index><Normal Text> </Normal Text><Index>..2]</Index><br/>
-+<Builtin>echo</Builtin><Normal Text> </Normal Text><Variable>$PATH</Variable><Index>[1 ..2]</Index><br/>
- <Normal Text></Normal Text><br/>
- <Comment>### Brace Expansion</Comment><br/>
- <Builtin>echo</Builtin><Normal Text> input.</Normal Text><Keychar>{</Keychar><Normal Text>c</Normal Text><Separator>,</Separator><Normal Text>12h</Normal Text><Separator>,</Separator><Normal Text>TXT</Normal Text><Keychar>}</Keychar><br/>
- <Builtin>echo</Builtin><Normal Text> input.</Normal Text><Keychar>{</Keychar><Normal Text>abc</Normal Text><Variable>$test</Variable><Index>[</Index><Keychar>(</Keychar><Builtin>count</Builtin><Normal Text> </Normal Text><Variable>$test</Variable><Keychar>)</Keychar><Index>..1]</Index><Separator>,</Separator><Keychar>(</Keychar><Builtin>echo</Builtin><Normal Text> </Normal Text><Variable>$txt</Variable><Keychar>)}</Keychar><br/>
- <Builtin>echo</Builtin><Normal Text> input.</Normal Text><Keychar>{</Keychar><Normal Text>a</Normal Text><Keychar>{</Keychar><Normal Text>b</Normal Text><Separator>,</Separator><Normal Text>c</Normal Text><Keychar>}</Keychar><Separator>,</Separator><Normal Text>12h</Normal Text><Separator>,</Separator><Normal Text>TXT</Normal Text><Keychar>}</Keychar><Error>}</Error><Normal Text> </Normal Text><Comment># show error</Comment><br/>
- <Normal Text></Normal Text><br/>
--<Normal Text></Normal Text><br/>
- <Comment>### Index range expansion</Comment><br/>
- <Builtin>echo</Builtin><Normal Text> </Normal Text><Keychar>(</Keychar><Builtin>echo</Builtin><Normal Text> </Normal Text><Variable>$a</Variable><Keychar>)</Keychar><Index>[2..5]</Index><br/>
- <Builtin>echo</Builtin><Normal Text> </Normal Text><Keychar>(</Keychar><Builtin>echo</Builtin><Normal Text> </Normal Text><Variable>$a</Variable><Keychar>)</Keychar><Index>[2..5 1..3]</Index><br/>
- <Builtin>echo</Builtin><Normal Text> </Normal Text><Keychar>(</Keychar><Builtin>echo</Builtin><Normal Text> </Normal Text><Variable>$a</Variable><Keychar>)</Keychar><Index>[-1..1]</Index><br/>
- <Normal Text></Normal Text><br/>
- <Comment>### Process expansion</Comment><br/>
--<Builtin>fg</Builtin><Normal Text> </Normal Text><Keychar>%</Keychar><Process>ema</Process><Normal Text> </Normal Text><Comment># ???</Comment><br/>
--<Normal Text></Normal Text><br/>
-+<Builtin>echo</Builtin><Normal Text> %ema </Normal Text><Comment># removed (expect %self) since 3.0b1 (released December 11, 2018)</Comment><br/>
-+<Builtin>echo</Builtin><Normal Text> %self </Normal Text><Comment># removed since 4.0.0 (released February 27, 2025)</Comment><br/>
- <Normal Text></Normal Text><br/>
- <Comment>### Command substitution</Comment><br/>
[suppressed due to size limit]
- <Normal Text></Normal Text><br/>
--<Builtin>echo</Builtin><Normal Text> </Normal Text><Keychar>(</Keychar><Comment>#hallo</Comment><Keychar>)</Keychar><Normal Text>abc </Normal Text><Comment># ok</Comment><br/>
--<Builtin>echo</Builtin><Normal Text> </Normal Text><Keychar>(</Keychar><UnixCommand>ls</UnixCommand><Normal Text> </Normal Text><Comment>#hallo</Comment><Keychar>)</Keychar><Normal Text>abc </Normal Text><Comment># ok, die context-Tiefe ist anders</Comment><br/>
--<Builtin>echo</Builtin><Normal Text> </Normal Text><Keychar>(</Keychar><UnixCommand>ls</UnixCommand><Separator>;</Separator><Comment>#hallo</Comment><Keychar>)</Keychar><Normal Text>abc </Normal Text><Comment># als hier.</Comment><br/>
-+<Builtin>echo</Builtin><Normal Text> </Normal Text><Keychar>(</Keychar><Comment>#hallo)abc</Comment><br/>
-+<Keychar>)</Keychar><br/>
-+<Builtin>echo</Builtin><Normal Text> </Normal Text><Keychar>(</Keychar><UnixCommand>ls</UnixCommand><Normal Text> </Normal Text><Comment>#hallo)abc</Comment><br/>
-+<Keychar>)</Keychar><br/>
-+<Builtin>echo</Builtin><Normal Text> </Normal Text><Keychar>(</Keychar><UnixCommand>ls</UnixCommand><Separator>;</Separator><Comment>#hallo)abc</Comment><br/>
-+<Keychar>)</Keychar><br/>
- <Builtin>echo</Builtin><Normal Text> </Normal Text><Keychar>(</Keychar><Command>ls#hallo</Command><Keychar>)</Keychar><Normal Text>abc </Normal Text><Comment># ok: # may be inner part of function names!</Comment><br/>
- <Builtin>echo</Builtin><Normal Text> </Normal Text><Keychar>(</Keychar><CommandPath>/usr/bin/</CommandPath><UnixCommand>ls</UnixCommand><Keychar>)</Keychar><br/>
- <Builtin>echo</Builtin><Normal Text> </Normal Text><Keychar>(</Keychar><UnixCommand>ls</UnixCommand><Normal Text> </Normal Text><Redirection>>></Redirection><Path>mem/abc</Path><Keychar>)</Keychar><br/>
- <Builtin>echo</Builtin><Normal Text> </Normal Text><Keychar>(</Keychar><Builtin>echo</Builtin><Normal Text> </Normal Text><Variable>$test</Variable><Index>[2]</Index><Keychar>)</Keychar><br/>
- <Builtin>echo</Builtin><Normal Text> </Normal Text><Keychar>(</Keychar><CommandPath>/usr</CommandPath><String DoubleQ>"/bi"</String DoubleQ><CommandPath>n/</CommandPath><UnixCommand>ls</UnixCommand><Normal Text> </Normal Text><Path>/tmp</Path><Keychar>)</Keychar><br/>
--<Builtin>echo</Builtin><Normal Text> </Normal Text><Keychar>(</Keychar><UnixCommand>seq</UnixCommand><Normal Text> 10</Normal Text><Keychar>)</Keychar><Index>[1]</Index><Normal Text>[2]</Normal Text><br/>
-+<Builtin>echo</Builtin><Normal Text> </Normal Text><Keychar>(</Keychar><UnixCommand>seq</UnixCommand><Normal Text> 10</Normal Text><Keychar>)</Keychar><Index>[1][2]</Index><br/>
- <Comment># ~~~ not an index</Comment><br/>
- <Builtin>echo</Builtin><Normal Text> </Normal Text><Keychar>(</Keychar><UnixCommand>seq</UnixCommand><Normal Text> 10</Normal Text><Keychar>)</Keychar><Escape>\</Escape><br/>
--<Index>[1]</Index><Normal Text>[2]</Normal Text><br/>
-+<Index>[1][2]</Index><br/>
- <Comment># ~~~ not an index</Comment><br/>
- <Builtin>echo</Builtin><Normal Text> </Normal Text><Keychar>(</Keychar><UnixCommand>seq</UnixCommand><Normal Text> 10</Normal Text><Keychar>)</Keychar><Escape>\</Escape><br/>
- <Index>[1]</Index><Escape>\</Escape><br/>
--<Normal Text>[2]</Normal Text><br/>
-+<Index>[2]</Index><br/>
- <Comment>#~~ not an index</Comment><br/>
- <Normal Text></Normal Text><br/>
- <Comment># multline command substitution</Comment><br/>
- <Builtin>set</Builtin><Normal Text> </Normal Text><Variable>x</Variable><Normal Text> </Normal Text><Keychar>(</Keychar><Builtin>echo</Builtin><Normal Text> dirlist</Normal Text><Separator>;</Separator><Normal Text> </Normal Text><Comment># blabla</Comment><br/>
- <Normal Text> </Normal Text><UnixCommand>ls</UnixCommand><Keychar>)</Keychar><br/>
- <Normal Text></Normal Text><br/>
--<Comment>## same, but commented out:</Comment><br/>
--<Normal Text></Normal Text><br/>
--<Comment># set x (echo dirlist; # blabla</Comment><br/>
--<Comment># ls)</Comment><br/>
--<Normal Text></Normal Text><br/>
- <Builtin>set</Builtin><Normal Text> </Normal Text><Variable>pi</Variable><Normal Text> </Normal Text><Keychar>(</Keychar><Builtin>math</Builtin><Normal Text> </Normal Text><String DoubleQ>"scale=10; 4*a(1)"</String DoubleQ><Keychar>)</Keychar><br/>
- <Normal Text></Normal Text><br/>
- <Comment>### Continuation lines</Comment><br/>
- <UnixCommand>ls</UnixCommand><Normal Text> </Normal Text><Escape>\</Escape><br/>
- <Normal Text> </Normal Text><Path>/usr/bin</Path><br/>
- <Normal Text></Normal Text><br/>
--<Builtin>test</Builtin><Normal Text> </Normal Text><String DoubleQ>"STRING1"</String DoubleQ><Operator>=</Operator><String DoubleQ>"STRING2"</String DoubleQ><Normal Text> </Normal Text><Operator>-a </Operator><Escape>\</Escape><br/>
-+<Builtin>test</Builtin><Normal Text> </Normal Text><String DoubleQ>"STRING1"</String DoubleQ><Normal Text>=</Normal Text><String DoubleQ>"STRING2"</String DoubleQ><Normal Text> </Normal Text><Operator>-a</Operator><Normal Text> </Normal Text><Escape>\</Escape><br/>
- <Normal Text> </Normal Text><String DoubleQ>"STRING3"</String DoubleQ><Normal Text> </Normal Text><Operator>=</Operator><Normal Text> </Normal Text><Keychar>(</Keychar><Builtin>echo</Builtin><Normal Text> </Normal Text><String DoubleQ>"STRING4"</String DoubleQ><Keychar>)</Keychar><br/>
- <Normal Text></Normal Text><br/>
- <Builtin>echo</Builtin><Normal Text> input.</Normal Text><Keychar>{</Keychar><Normal Text>abc</Normal Text><Escape>\</Escape><br/>
-@@ -330,7 +326,7 @@
- <Builtin>echo</Builtin><Normal Text> </Normal Text><String DoubleQ>"123456</String DoubleQ><Escape>\</Escape><br/>
- <String DoubleQ> 78910"</String DoubleQ><br/>
- <Builtin>echo</Builtin><Normal Text> </Normal Text><Variable>$PATH</Variable><Index>[1..3</Index><Escape>\</Escape><br/>
--<Normal Text> </Normal Text><Index>]</Index><br/>
-+<Index> ]</Index><br/>
- <UnixCommand>ls</UnixCommand><Normal Text> </Normal Text><Path>/usr</Path><Escape>\</Escape><br/>
- <Path>local/bin</Path><br/>
- <Builtin>echo</Builtin><Normal Text> foo</Normal Text><Escape>\ </Escape><Normal Text>bar</Normal Text><br/>
-@@ -338,7 +334,7 @@
- <Normal Text>bar</Normal Text><br/>
- <Normal Text></Normal Text><br/>
- <Control Flow>for</Control Flow><Normal Text> </Normal Text><Variable>i</Variable><Normal Text> </Normal Text><Escape>\</Escape><br/>
--<Normal Text> </Normal Text><Control Flow>in</Control Flow><Normal Text> </Normal Text><Escape>\</Escape><br/>
-+<Normal Text> </Normal Text><Keyword>in</Keyword><Normal Text> </Normal Text><Escape>\</Escape><br/>
- <Normal Text> a b c</Normal Text><br/>
- <Normal Text> </Normal Text><Builtin>echo</Builtin><Normal Text> </Normal Text><Variable>$i</Variable><br/>
- <Control Flow>end</Control Flow><br/>
-@@ -394,37 +390,37 @@
- <UnixCommand>diff</UnixCommand><Normal Text> </Normal Text><Keychar>(</Keychar><UnixCommand>sort</UnixCommand><Normal Text> a.txt </Normal Text><Separator>|</Separator><Normal Text> </Normal Text><Builtin>psub</Builtin><Keychar>)</Keychar><Normal Text> </Normal Text><Keychar>(</Keychar><UnixCommand>sort</UnixCommand><Normal Text> b.txt </Normal Text><Separator>|</Separator><Normal Text> </Normal Text><Builtin>psub</Builtin><Keychar>)</Keychar><br/>
- <Command>source-highlight</Command><Normal Text> </Normal Text><Option>-f</Option><Normal Text> esc </Normal Text><Keychar>(</Keychar><UnixCommand>cpp</UnixCommand><Normal Text> main.c </Normal Text><Separator>|</Separator><Normal Text> </Normal Text><Builtin>psub</Builtin><Normal Text> </Normal Text><Option>-s</Option><Normal Text> .c</Normal Text><Keychar>)</Keychar><br/>
- <Normal Text></Normal Text><br/>
--<Control Flow>while</Control Flow><Normal Text> </Normal Text><Builtin>test</Builtin><Normal Text> </Normal Text><Operator>-f </Operator><Path>foo.txt</Path><Normal Text> </Normal Text><Comment># comment</Comment><br/>
-+<Control Flow>while</Control Flow><Normal Text> </Normal Text><Builtin>test</Builtin><Normal Text> </Normal Text><Operator>-f</Operator><Normal Text> </Normal Text><Path>foo.txt</Path><Normal Text> </Normal Text><Comment># comment</Comment><br/>
- <Normal Text> </Normal Text><Builtin>echo</Builtin><Normal Text> hallo</Normal Text><br/>
- <Control Flow>end</Control Flow><br/>
- <Normal Text></Normal Text><br/>
--<Control Flow>for</Control Flow><Normal Text> </Normal Text><Variable>i</Variable><Normal Text> </Normal Text><Control Flow>in</Control Flow><Normal Text> </Normal Text><Keychar>{</Keychar><Normal Text>1</Normal Text><Separator>,</Separator><Keychar>(</Keychar><UnixCommand>ls</UnixCommand><Keychar>)</Keychar><Separator>,</Separator><Normal Text>3</Normal Text><Keychar>}</Keychar><Normal Text> </Normal Text><Comment># comment</Comment><br/>
-+<Control Flow>for</Control Flow><Normal Text> </Normal Text><Variable>i</Variable><Normal Text> </Normal Text><Keyword>in</Keyword><Normal Text> </Normal Text><Keychar>{</Keychar><Normal Text>1</Normal Text><Separator>,</Separator><Keychar>(</Keychar><UnixCommand>ls</UnixCommand><Keychar>)</Keychar><Separator>,</Separator><Normal Text>3</Normal Text><Keychar>}</Keychar><Normal Text> </Normal Text><Comment># comment</Comment><br/>
- <Normal Text> </Normal Text><Builtin>echo</Builtin><Normal Text> </Normal Text><Variable>$i</Variable><br/>
- <Control Flow>end</Control Flow><br/>
- <Normal Text></Normal Text><br/>
- <Comment># function</Comment><br/>
--<Control Flow>function</Control Flow><Normal Text> </Normal Text><Command>__hidden</Command><Normal Text> </Normal Text><Comment># comment</Comment><br/>
-+<Keyword>function</Keyword><Normal Text> </Normal Text><Command>__hidden</Command><Normal Text> </Normal Text><Comment># comment</Comment><br/>
- <Normal Text> </Normal Text><Builtin>cd</Builtin><Normal Text> </Normal Text><Path>/</Path><br/>
- <Control Flow>end</Control Flow><br/>
- <Normal Text></Normal Text><br/>
--<Control Flow>function</Control Flow><Normal Text> </Normal Text><Command>ll</Command><Normal Text> </Normal Text><Escape>\</Escape><br/>
-+<Keyword>function</Keyword><Normal Text> </Normal Text><Command>ll</Command><Normal Text> </Normal Text><Escape>\</Escape><br/>
- <Normal Text> </Normal Text><Option>-d </Option><Function Doc>"multiline</Function Doc><br/>
- <Function Doc> description"</Function Doc><br/>
- <Normal Text> </Normal Text><UnixCommand>ls</UnixCommand><Normal Text> </Normal Text><Option>-l</Option><Normal Text> </Normal Text><Variable>$argv</Variable><br/>
- <Control Flow>end</Control Flow><br/>
- <Normal Text></Normal Text><br/>
--<Control Flow>function</Control Flow><Normal Text> </Normal Text><Command>ls</Command><Normal Text> </Normal Text><Option>--description=</Option><Function Doc>"Description"</Function Doc><Normal Text> </Normal Text><Option>-a</Option><Normal Text> a b c </Normal Text><Comment># comment</Comment><br/>
-+<Keyword>function</Keyword><Normal Text> </Normal Text><Command>ls</Command><Normal Text> </Normal Text><Option>--description=</Option><Function Doc>"Description"</Function Doc><Normal Text> </Normal Text><Option>-a</Option><Normal Text> a b c </Normal Text><Comment># comment</Comment><br/>
- <Normal Text> </Normal Text><Builtin>command</Builtin><Normal Text> </Normal Text><UnixCommand>ls</UnixCommand><Normal Text> </Normal Text><Option>--color</Option><Operator>=</Operator><Normal Text>auto </Normal Text><Variable>$argv</Variable><br/>
--<Normal Text> </Normal Text><Control Flow>if</Control Flow><Normal Text> </Normal Text><Builtin>test</Builtin><Normal Text> </Normal Text><Operator>-f </Operator><Path>foo.txt</Path><br/>
-+<Normal Text> </Normal Text><Control Flow>if</Control Flow><Normal Text> </Normal Text><Builtin>test</Builtin><Normal Text> </Normal Text><Operator>-f</Operator><Normal Text> </Normal Text><Path>foo.txt</Path><br/>
- <Normal Text> </Normal Text><Builtin>echo</Builtin><Normal Text> foo.txt exists</Normal Text><br/>
--<Normal Text> </Normal Text><Control Flow>else</Control Flow><Normal Text> </Normal Text><Control Flow>if</Control Flow><Normal Text> </Normal Text><Builtin>test</Builtin><Normal Text> </Normal Text><Operator>-f </Operator><Path>bar.txt</Path><Normal Text> </Normal Text><Comment># comment</Comment><br/>
-+<Normal Text> </Normal Text><Control Flow>else</Control Flow><Normal Text> </Normal Text><Control Flow>if</Control Flow><Normal Text> </Normal Text><Builtin>test</Builtin><Normal Text> </Normal Text><Operator>-f</Operator><Normal Text> </Normal Text><Path>bar.txt</Path><Normal Text> </Normal Text><Comment># comment</Comment><br/>
- <Normal Text> </Normal Text><Builtin>echo</Builtin><Normal Text> bar.txt exists</Normal Text><br/>
- <Normal Text> </Normal Text><Control Flow>else</Control Flow><br/>
- <Normal Text> </Normal Text><Builtin>echo</Builtin><Normal Text> foo.txt and bar.txt do not exist</Normal Text><br/>
- <Normal Text> </Normal Text><Control Flow>end</Control Flow><Normal Text> </Normal Text><Comment># comment</Comment><br/>
- <Control Flow>end</Control Flow><br/>
- <Normal Text></Normal Text><br/>
--<Control Flow>function</Control Flow><Normal Text> </Normal Text><Command>test</Command><Separator>;</Separator><Builtin>echo</Builtin><Normal Text> hallo</Normal Text><Separator>;</Separator><Control Flow>end</Control Flow><Normal Text> </Normal Text><Comment># comment</Comment><br/>
-+<Keyword>function</Keyword><Normal Text> </Normal Text><Command>test</Command><Separator>;</Separator><Builtin>echo</Builtin><Normal Text> hallo</Normal Text><Separator>;</Separator><Control Flow>end</Control Flow><Normal Text> </Normal Text><Comment># comment</Comment><br/>
- <Normal Text></Normal Text><br/>
- <Control Flow>switch</Control Flow><Normal Text> </Normal Text><Variable>$animal</Variable><Normal Text> </Normal Text><Comment># comment</Comment><br/>
- <Normal Text> </Normal Text><Control Flow>case</Control Flow><Normal Text> cat </Normal Text><Comment># comment</Comment><br/>
-@@ -442,41 +438,41 @@
- <Normal Text> </Normal Text><Builtin>echo</Builtin><Normal Text> </Normal Text><String DoubleQ>"?"</String DoubleQ><br/>
- <Control Flow>end</Control Flow><br/>
- <Normal Text></Normal Text><br/>
--<Control Flow>if</Control Flow><Normal Text> </Normal Text><Control Flow>not</Control Flow><Normal Text> </Normal Text><Builtin>test</Builtin><Normal Text> </Normal Text><Operator>-f </Operator><Path>spoon</Path><Normal Text> </Normal Text><Comment>#comment</Comment><br/>
-+<Control Flow>if</Control Flow><Normal Text> </Normal Text><Control Flow>not</Control Flow><Normal Text> </Normal Text><Builtin>test</Builtin><Normal Text> </Normal Text><Operator>-f</Operator><Normal Text> </Normal Text><Path>spoon</Path><Normal Text> </Normal Text><Comment>#comment</Comment><br/>
- <Normal Text> </Normal Text><Builtin>echo</Builtin><Normal Text> There is no spoon</Normal Text><br/>
- <Control Flow>else</Control Flow><br/>
- <Normal Text> </Normal Text><Builtin>exit</Builtin><Normal Text> 1</Normal Text><br/>
- <Control Flow>end</Control Flow><br/>
- <Normal Text></Normal Text><br/>
--<Control Flow>for</Control Flow><Normal Text> </Normal Text><Variable>file</Variable><Normal Text> </Normal Text><Control Flow>in</Control Flow><Normal Text> </Normal Text><Variable>$cfgfiles</Variable><br/>
--<Normal Text> </Normal Text><Control Flow>if</Control Flow><Normal Text> </Normal Text><Builtin>test</Builtin><Normal Text> </Normal Text><Operator>-f </Operator><Variable>$file</Variable><br/>
-+<Control Flow>for</Control Flow><Normal Text> </Normal Text><Variable>file</Variable><Normal Text> </Normal Text><Keyword>in</Keyword><Normal Text> </Normal Text><Variable>$cfgfiles</Variable><br/>
-+<Normal Text> </Normal Text><Control Flow>if</Control Flow><Normal Text> </Normal Text><Builtin>test</Builtin><Normal Text> </Normal Text><Operator>-f</Operator><Normal Text> </Normal Text><Variable>$file</Variable><br/>
[suppressed due to size limit]
- <Normal Text> </Normal Text><Control Flow>end</Control Flow><br/>
- <Control Flow>end</Control Flow><Normal Text> </Normal Text><Separator>|</Separator><Normal Text> </Normal Text><UnixCommand>sort</UnixCommand><Normal Text> </Normal Text><Option>-u</Option><Normal Text> </Normal Text><Separator>|</Separator><Normal Text> </Normal Text><Builtin>string</Builtin><Normal Text> </Normal Text><Builtin>match</Builtin><Normal Text> </Normal Text><Option>-v</Option><Normal Text> Defaults</Normal Text><br/>
- <Normal Text></Normal Text><br/>
--<Control Flow>for</Control Flow><Normal Text> </Normal Text><Variable>i</Variable><Normal Text> </Normal Text><Control Flow>in</Control Flow><Normal Text> </Normal Text><Glob>*</Glob><Path>.c</Path><br/>
-+<Control Flow>for</Control Flow><Normal Text> </Normal Text><Variable>i</Variable><Normal Text> </Normal Text><Keyword>in</Keyword><Normal Text> </Normal Text><Glob>*</Glob><Path>.c</Path><br/>
- <Normal Text> </Normal Text><Control Flow>if</Control Flow><Normal Text> </Normal Text><UnixCommand>grep</UnixCommand><Normal Text> smurf </Normal Text><Variable>$i</Variable><Normal Text> </Normal Text><Comment># comment</Comment><br/>
- <Normal Text> </Normal Text><Builtin>echo</Builtin><Normal Text> Smurfs are present in </Normal Text><Variable>$i</Variable><br/>
--<Normal Text> </Normal Text><Builtin>break</Builtin><br/>
-+<Normal Text> </Normal Text><Control Flow>break</Control Flow><br/>
- <Normal Text> </Normal Text><Control Flow>end</Control Flow><br/>
- <Control Flow>end</Control Flow><br/>
- <Normal Text></Normal Text><br/>
--<Control Flow>if</Control Flow><Normal Text> </Normal Text><Control Flow>begin</Control Flow><Normal Text> </Normal Text><Builtin>contains</Builtin><Normal Text> </Normal Text><Option>--</Option><Normal Text> </Normal Text><Variable>$argv</Variable><Normal Text> </Normal Text><Option>--force</Option><Normal Text> </Normal Text><Comment># ohne ; nach begin: geht</Comment><br/>
-+<Control Flow>if</Control Flow><Normal Text> </Normal Text><Keyword>begin</Keyword><Normal Text> </Normal Text><Builtin>contains</Builtin><Normal Text> </Normal Text><Option>--</Option><Normal Text> </Normal Text><Variable>$argv</Variable><Normal Text> </Normal Text><Option>--force</Option><Normal Text> </Normal Text><Comment># ohne ; nach begin: geht</Comment><br/>
- <Normal Text> </Normal Text><Control Flow>or</Control Flow><Normal Text> </Normal Text><Control Flow>not</Control Flow><Normal Text> </Normal Text><Builtin>status</Builtin><Normal Text> </Normal Text><Option>--is-interactive</Option><Normal Text> and not status </Normal Text><Option>--is-login</Option><br/>
--<Normal Text> </Normal Text><Control Flow>end</Control Flow><br/>
-+<Normal Text> </Normal Text><Keyword>end</Keyword><br/>
- <Normal Text> </Normal Text><Builtin>echo</Builtin><Normal Text> </Normal Text><String DoubleQ>""</String DoubleQ><br/>
- <Control Flow>end</Control Flow><br/>
- <Normal Text></Normal Text><br/>
--<Control Flow>begin</Control Flow><Normal Text> </Normal Text><Comment># comment</Comment><br/>
--<Normal Text> </Normal Text><Control Flow>for</Control Flow><Normal Text> </Normal Text><Variable>i</Variable><Normal Text> </Normal Text><Control Flow>in</Control Flow><Normal Text> </Normal Text><Glob>*</Glob><Path>.tmp</Path><br/>
-+<Keyword>begin</Keyword><Normal Text> </Normal Text><Comment># comment</Comment><br/>
-+<Normal Text> </Normal Text><Control Flow>for</Control Flow><Normal Text> </Normal Text><Variable>i</Variable><Normal Text> </Normal Text><Keyword>in</Keyword><Normal Text> </Normal Text><Glob>*</Glob><Path>.tmp</Path><br/>
- <Normal Text> </Normal Text><Control Flow>if</Control Flow><Normal Text> </Normal Text><UnixCommand>grep</UnixCommand><Normal Text> smurf </Normal Text><Variable>$i</Variable><br/>
--<Normal Text> </Normal Text><Builtin>continue</Builtin><br/>
-+<Normal Text> </Normal Text><Control Flow>continue</Control Flow><br/>
- <Normal Text> </Normal Text><Control Flow>end</Control Flow><br/>
- <Normal Text> </Normal Text><UnixCommand>rm</UnixCommand><Normal Text> </Normal Text><Variable>$i</Variable><br/>
- <Normal Text> </Normal Text><Control Flow>end</Control Flow><br/>
--<Control Flow>end</Control Flow><br/>
-+<Keyword>end</Keyword><br/>
- <Normal Text></Normal Text><br/>
--<Control Flow>if</Control Flow><Normal Text> </Normal Text><Builtin>[ </Builtin><Variable>$status</Variable><Operator> -eq </Operator><Normal Text>1</Normal Text><Builtin> ]</Builtin><br/>
-+<Control Flow>if</Control Flow><Normal Text> </Normal Text><Builtin>[ </Builtin><Variable>$status</Variable><Normal Text> </Normal Text><Operator>-eq</Operator><Normal Text> 1 </Normal Text><Builtin>]</Builtin><br/>
- <Normal Text> </Normal Text><Builtin>set</Builtin><Normal Text> </Normal Text><Variable>sta</Variable><Normal Text> pass</Normal Text><br/>
- <Control Flow>else</Control Flow><br/>
- <Normal Text> </Normal Text><Builtin>set</Builtin><Normal Text> </Normal Text><Variable>sta</Variable><Normal Text> fail</Normal Text><br/>
-@@ -487,11 +483,11 @@
- <Normal Text></Normal Text><br/>
- <Comment># Process Expansion</Comment><br/>
- <Comment># see fish issue 4230</Comment><br/>
--<UnixCommand>kill</UnixCommand><Normal Text> </Normal Text><Option>-STOP</Option><Normal Text> </Normal Text><Keychar>%</Keychar><Process>self</Process><br/>
-+<UnixCommand>kill</UnixCommand><Normal Text> </Normal Text><Option>-STOP</Option><Normal Text> %self</Normal Text><br/>
- <Normal Text></Normal Text><br/>
- <Command>endcmd</Command><Normal Text> </Normal Text><Comment># is a command</Comment><br/>
- <Normal Text></Normal Text><br/>
--<Control Flow>for</Control Flow><Normal Text> </Normal Text><Variable>inc</Variable><Normal Text> </Normal Text><Control Flow>in</Control Flow><Normal Text> a </Normal Text><Comment># inc is a variable</Comment><br/>
-+<Control Flow>for</Control Flow><Normal Text> </Normal Text><Variable>inc</Variable><Normal Text> </Normal Text><Keyword>in</Keyword><Normal Text> a </Normal Text><Comment># inc is a variable</Comment><br/>
- <Control Flow>end</Control Flow><br/>
- <Normal Text></Normal Text><br/>
- <Control Flow>switch</Control Flow><Normal Text> d</Normal Text><Separator>;</Separator><Control Flow>case</Control Flow><Normal Text> </Normal Text><String DoubleQ>"*"</String DoubleQ><Normal Text> </Normal Text><Separator>;</Separator><Normal Text> </Normal Text><Control Flow>case</Control Flow><Normal Text> d</Normal Text><Separator>;</Separator><Builtin>echo</Builtin><Separator>;</Separator><Normal Text> </Normal Text><Control Flow>end</Control Flow><br/>
-diff --git a/data/syntax/fish.xml b/data/syntax/fish.xml
-index ad53e4e76beb4f97f732a04d38e066c1f318d7ef..2543ed5fdb38e341f46da38f67c7ac480ffd003a 100644
---- a/data/syntax/fish.xml
-+++ b/data/syntax/fish.xml
-@@ -1,44 +1,88 @@
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE language
- [
-- <!ENTITY tab "	">
-- <!ENTITY white "&tab; "> <!-- first is tab -->
-- <!ENTITY eocommand "&white;<>^"> <!-- end of command separator -->
-- <!ENTITY separator "&white;|&;<>()'""> <!-- token separator as char list -->
-- <!ENTITY commandsep "|&;"> <!-- command separator as char list -->
-- <!ENTITY special "{}*/.?\\$&"> <!-- not allowed in function names -->
-- <!ENTITY portable_filename "A-Za-z0-9\._-">
-- <!ENTITY funcname_first "a-zA-Z+:=!. at _`">
-- <!ENTITY funcname_last "a-zA-Z0-9+,-:=!.@#%^_`~">
-- <!ENTITY funcname "[&funcname_first;](?:[&funcname_last;]|\\ )*">
-- <!ENTITY varname "[A-Za-z0-9_]+">
-- <!ENTITY alnumdash "[A-Za-z0-9-]"> <!-- option chars, dashes for GNU long opts -->
-- <!ENTITY testoptsfile "[bcdefgGkLOprsStuwx]"> <!-- test operators for file testing -->
-- <!ENTITY testoptsother "[nzao]"> <!-- other test operators -->
-- <!ENTITY braceelement "[!#%+\-\./0-9:=@A-Z^_`a-z~]">
-- <!ENTITY escapechars "[abefnrtv $\\*?~%#(){}[\]<>\^&;"']"> <!-- escape chars -->
-- <!ENTITY white_or_eol "(?:[&white;]|$)">
-- <!ENTITY homedir "~[&portable_filename;]*">
-- <!ENTITY pathdetect "(?:(?:\.\.?|&homedir;)&white_or_eol;|(?:[^$\\{}&separator;/\*\?]|\\&escapechars;)*(:?[/?]|\*\*?))">
-- <!ENTITY pathpart "(?:[^&separator;/]|\\&escapechars;)*(?:/|(?=["']))">
-- <!ENTITY command "([-\w+,-:=!.@#%^_`~]+|\\ )+">
-+ <!ENTITY tab "	">
-+ <!ENTITY white "&tab; ">
-+ <!ENTITY separator "&white;|&;<>()'""> <!-- token separator as char list -->
-+ <!ENTITY sym_sep "*?$\\{}&separator;">
-+ <!ENTITY path_sym_sep "/&sym_sep;">
-+ <!ENTITY blocksep "|;&#)}<>">
-+
-+ <!ENTITY inbrace_text "[^,\\{}()'"$]*+">
-+ <!-- fake recursive, only supports 2 levels of brace e.g. {ab{cd}ef} -->
-+ <!ENTITY inbrace_text2 "(&inbrace_text;|\{&inbrace_text;\})*+">
-+ <!ENTITY nobrace_text "\{&inbrace_text2;\}">
-+
-+ <!-- see ampersand-nobg-in-token feature
-+ echo a&b
-+ ~ no special
-+ echo a&
-+ ~ special
-+ -->
-+ <!ENTITY amp_sym_sep ";|&white;&<>">
-+ <!ENTITY amp_sep "([&_sym_sep;]|$)">
-+ <!ENTITY text_amp "(&(?=[^&_sym_sep;]))">
-+
-+ <!ENTITY text_sym "(&text_amp;|&nobrace_text;)">
-+
-+ <!ENTITY end_of_text_base "$|[&white;|;<>]|&&_sep;">
-+ <!ENTITY is_end_of_text "(?=&end_of_text_base;)">
-+
-+ <!ENTITY varname "\w+">
-+ <!-- https://fishshell.com/docs/current/language.html#escaping-characters
-+ note: \b is missing -->
-+ <!ENTITY escape_chars "\\([abefnrtv $\\*?~#(){}[\]<>&|;"']|[0-7]{1,3}|[xX][A-Fa-f0-9]{1,2}|u[A-Fa-f0-9]{1,4}|U[A-Fa-f0-9]{1,8}|c[a-zA-Z])|\\(?![xXuUc])">
-+ <!ENTITY simplevar "\$+(\w*+|\(([-\w\s$]|\\.)*+\))(\[[-+&white;0-9]\])*+">
-+
-+ <!ENTITY text "([^&sym_sep;]++|&text_sym;)*+">
-+ <!ENTITY text_in_brace "([^,&sym_sep;]++|&text_sym;)*+">
-+ <!ENTITY option_name "[-A-Za-z0-9]+">
-+
-+ <!ENTITY homedir "~[-A-Za-z0-9._]*(?=/|&end_of_text_base;)">
-+
-+ <!-- consume string, stop at / -->
-+ <!ENTITY path_dir_sq "'([^/'\\]*|\\.)*+'?+">
-+ <!ENTITY path_dir_dq '"([^/"\\$]*|\\.|&simplevar;)*+"?+'>
-+ <!ENTITY path_prefix "([^&path_sym_sep;]++|&text_sym;])*+">
-+ <!ENTITY path_syms "([^&path_sym_sep;]++|&path_dir_sq;|&path_dir_dq;|&text_sym;|&simplevar;|\\.)*+">
-+ <!ENTITY path_dot "(^|(?<=[&white;]))[.]{1,2}(?=&is_end_of_text;)">
-+ <!ENTITY path "&path_dot;|(&path_prefix;(/+|(?=&path_syms;[/*?])))++">
-+
-+ <!ENTITY command_sep_sym "/$\\{}&white;|;<>()'"">
-+ <!ENTITY command_dir_prefix "([^*?&command_sep_sym;]++|\\ |&nobrace_text;])*+">
-+ <!ENTITY command_dir_syms "([^&command_sep_sym;]++|&path_dir_sq;|&path_dir_dq;|&nobrace_text;|&simplevar;|\\.)*+">
-+ <!ENTITY command_dir "(&command_dir_prefix;(/+|(?=&command_dir_syms;/)))++">
-+
-+ <!-- all unix commands and builtins are ascii with '-' and '+' (e.g. g++) -->
-+ <!ENTITY simple_command "[-+\w]++">
-+ <!ENTITY is_end_of_simple_cmd "(?=[&white;|;<>)}]|&&_sep;|$)">
- ]>
-
-+<language name="Fish" version="11" kateversion="6.22" section="Scripts" extensions="*.fish;fishd.*" mimetype="application/x-fish" casesensitive="1" author="Arnd Diestelhorst (adiestelhorst at m-xchg.de)" license="LGPL">
-
--<language name="Fish" version="10" kateversion="5.72" section="Scripts" extensions="*.fish;fishd.*" mimetype="application/x-fish" casesensitive="1" author="Arnd Diestelhorst (adiestelhorst at m-xchg.de)" license="LGPL">
-+ <!-- Based on Fish 4.6
-+ https://fishshell.com/docs/current/relnotes.html
-+ https://fishshell.com/docs/current/language.html
-+ https://fishshell.com/docs/current/commands.html
-
-+ Assume features:
-+ - ampersand-nobg-in-token on ('&' in 'echo a&b' is a regular character)
-+ - qmark-noglob off ('?' is a globbing character)
-+ -->
-
- <highlighting>
-
-- <list name= "commands">
-+ <list name="commands">
- <item>abbr</item>
- <item>alias</item>
- <item>argparse</item>
- <item>bg</item>
- <item>bind</item>
- <item>block</item>
-+ <item>builtin</item>
- <item>cd</item>
- <item>cdh</item>
-+ <item>command</item>
- <item>commandline</item>
- <item>complete</item>
- <item>contains</item>
-@@ -48,6 +92,8 @@
- <item>echo</item>
- <item>emit</item>
- <item>end</item>
-+ <item>eval</item>
-+ <item>exec</item>
- <item>exit</item>
- <item>fg</item>
- <item>fish</item>
-@@ -75,12 +121,16 @@
- <item>psub</item>
- <item>pushd</item>
- <item>random</item>
-+ <item>read</item>
- <item>realpath</item>
- <item>return</item>
-+ <item>set</item>
- <item>set_color</item>
- <item>source</item>
- <item>status</item>
-+ <item>string</item>
- <item>suspend</item>
-+ <item>test</item>
- <item>trap</item>
- <item>type</item>
- <item>ulimit</item>
-@@ -107,14 +157,19 @@
- </list>
-
- <list name="stringsubcommands">
-+ <item>collect</item>
- <item>escape</item>
- <item>join</item>
-+ <item>join0</item>
- <item>length</item>
- <item>lower</item>
- <item>match</item>
-+ <item>pad</item>
- <item>repeat</item>
- <item>replace</item>
-+ <item>shorten</item>
- <item>split</item>
-+ <item>split0</item>
- <item>sub</item>
- <item>trim</item>
- <item>unescape</item>
-@@ -123,586 +178,809 @@
-
- <list name="unixcommands">
- <include>unixcommands##Bash</include>
-- <item>command</item>
- <item>kill</item>
-- <item>test</item>
- </list>
-
-+ <contexts>
-+ <context name="Root" attribute="Normal Text" fallthroughContext="Arguments!FieldSep!CommandName">
-+ <DetectSpaces attribute="Normal Text"/>
-+ <AnyChar attribute="Separator" String="|&;"/>
-+ <IncludeRules context="FindComment"/>
-+
-+ <StringDetect String="[&tab;" attribute="Builtin" context="ArgumentsTestBrack"/>
-+ <StringDetect String="[ " attribute="Builtin" context="ArgumentsTestBrack"/>
-+ <StringDetect String="!" lookAhead="1" context="NotOrCommand"/>
-+ <StringDetect String="{" attribute="Keyword" context="Block" beginRegion="block"/>
-+ <!-- \ newline is a no op in this context -->
-+ <LineContinue attribute="Escape"/>
-
-+ <AnyChar String="*?'"$" lookAhead="1" context="Arguments!FieldSep!CommandPart"/>
-+ <RegExpr String="&simple_command;&is_end_of_simple_cmd;" lookAhead="1" context="CommandSimple"/>
-+ <StringDetect String=". " attribute="Builtin" context="Arguments"/>
-+ <RegExpr String="&varname;(?==)" attribute="Variable" context="SetEnv"/>
-+ <RegExpr String="&command_dir;" attribute="CommandPath" context="Arguments!FieldSep!CommandPart"/>
-
-- <contexts>
-- <context name="Start" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="Root">
-- <DetectChar attribute="Error" context="DropRestOfLine" char=")"/>
-+ <AnyChar String=")}<>" attribute="Error" context="Arguments!FieldSep"/>
-+ <AnyChar String="(" attribute="Error" context="#pop"/>
- </context>
-
-- <context name="DropRestOfLine" attribute="Normal Text" lineEndContext="#pop">
-- <DetectChar attribute="Comment" context="Comment" char="#"/>
-- <RegExpr attribute="Normal Text" String="[^#]*" />
-+ <!-- ! cmd -->
-+ <context name="NotOrCommand" attribute="Normal Text" fallthroughContext="#pop!Arguments!FieldSep!CommandPart">
-+ <RegExpr String="!&is_end_of_text;" attribute="Operator" context="#pop"/>
- </context>
-
-- <!-- Root starts at a new line (not continuation) -->
-- <context name="Root" attribute="Normal Text" lineEndContext="#pop">
-- <LineContinue attribute="Escape" />
-- <DetectChar attribute="Comment" context="Comment" char="#"/>
-- <DetectChar context="#pop" char=")" lookAhead="true" />
-- <IncludeRules context="FindCommands" />
-+ <!-- { cmd } -->
-+ <context name="Block" attribute="Normal Text" fallthroughContext="Arguments!FieldSep!CommandName">
-+ <StringDetect String="}" attribute="Keyword" context="#pop!ArgumentsNone!FieldSep" endRegion="block"/>
-+ <IncludeRules context="Root"/>
- </context>
-
-- <!--
-- fish interprets closing parenthesis inside comments as end of command substitution, if the comment starts
-- inside of a command substitution!
-
-- fish does not interpret them this way, when
-- they are escaped by a \ or
-- they are matched by an earlier opening parenthesis inside the same comment.
-- This behaviour is replicated here.
-+ <!--
-+ @{ Set env command
-+ -->
-+ <!-- var=value cmd -->
-+ <context name="SetEnv" attribute="Normal Text">
-+ <DetectChar char="=" attribute="Builtin" context="#pop!VarValue"/>
-+ </context>
-+ <context name="VarValue" attribute="Normal Text">
-+ <IncludeRules context="PopWhenSep"/>
-+ <IncludeRules context="FindFishExpr"/>
-+ </context>
-+ <!--
-+ @} Set env command
-+ -->
-
-- Command substitutions may span several lines, so the closing parenthesis may be on a different line,
-- than the opening one. In the interactive shell you need a continuation line for this, not so in scripts.
-- Blocks of code with multiline command substitutions may be commented out. This should not lead to visual artifacts.
-
-- There is one case, where the following solution fails: a lonely closing ")", which is marked as an error.
-+ <!--
-+ @{ Comment
- -->
-+ <context name="FindComment" attribute="Comment">
-+ <DetectChar char="#" attribute="Comment" context="Comment"/>
-+ </context>
-+
- <context name="Comment" attribute="Comment" lineEndContext="#pop">
-- <Detect2Chars attribute="Comment" char="\" char1="(" />
-- <Detect2Chars attribute="Comment" char="\" char1=")" />
-- <DetectChar context="CommentParenSub" char="(" />
-- <DetectChar context="#pop" char=")" lookAhead="true" />
-- <IncludeRules context="##Comments" />
-- </context>
--
-- <context name="CommentParenSub" attribute="Comment" lineEndContext="BlockComment">
-- <DetectChar attribute="Comment" context="#pop" char=")" />
-- <IncludeRules context="Comment" />
-- </context>
--
-- <context name="BlockComment" attribute="Comment" fallthroughContext="#pop#pop#pop" lineEndContext="#stay">
-- <DetectChar attribute="Comment" context="#pop" char="#" firstNonSpace="true"/>
-- </context>
--
-- <!-- FindCommands matches Fish and Unix commands -->
-- <!-- order is important, factor out common rules did'nt work because of order of rules-->
-- <context name="FindCommands" attribute="Command" lineEndContext="#stay">
-- <DetectSpaces attribute="Normal Text" />
-- <AnyChar attribute="Error" context="#pop!DropRestOfLine" String="(<>"/>
-- <AnyChar attribute="Separator" String="&commandsep;" />
-- <keyword attribute="Builtin" context="Arguments" String="commands" /> <!--simple commands first-->
-- <keyword attribute="Builtin" context="ArgumentsNone" String="commandsnoargs" />
-- <keyword attribute="Control Flow" String="commandsstay" />
-- <Detect2Chars attribute="Builtin" context="Arguments" char="." char1=" " />
-- <RegExpr attribute="CommandPath" context="CommandPart" String="&pathdetect;" />
-- <IncludeRules context="FindSpecialCommands" /> <!--before unixcommands, because f test, but after path detection-->
-- <keyword attribute="UnixCommand" context="Arguments" String="unixcommands"/>
-- <RegExpr attribute="Command" context="CommandPart" String="&command;" />
-- <DetectChar context="CommandPart" char=""" lookAhead="true"/>
-- </context>
--
-- <context name="CommandPart" attribute="Command" lineEndContext="#pop">
-- <LineContinue attribute="Escape" />
-- <AnyChar context="#pop" String=")#" lookAhead="true"/>
-- <AnyChar attribute="Separator" context="#pop" String="&commandsep;" />
-- <AnyChar context="#pop!Arguments" String="&eocommand;" lookAhead="true"/>
-- <RegExpr attribute="CommandPath" String="&pathpart;" />
-- <keyword attribute="UnixCommand" String="unixcommands"/>
-- <RegExpr attribute="Command" String="&command;" />
-- <IncludeRules context="FindStrings" />
-- <RegExpr attribute="Error" String="." />
-- </context>
--
-- <context name="FindSpecialCommands" attribute="Builtin" lineEndContext="#stay">
-- <WordDetect attribute="Builtin" String="command" context="command_builtin" />
-- <WordDetect attribute="Builtin" String="builtin" context="command_builtin" />
-- <WordDetect attribute="Builtin" String="eval" context="eval_exec" />
-- <WordDetect attribute="Builtin" String="exec" context="eval_exec" />
-- <WordDetect attribute="Builtin" String="set" context="set" />
-- <WordDetect attribute="Builtin" String="string" context="string" />
-- <WordDetect attribute="Builtin" String="read" context="read_vared" />
-- <WordDetect attribute="Builtin" String="vared" context="read_vared" />
-- <WordDetect attribute="Builtin" String="test" context="ArgumentsTest" />
-- <Detect2Chars attribute="Builtin" char="[" char1="&tab;" context="ArgumentsTestBrack" />
-- <Detect2Chars attribute="Builtin" char="[" char1=" " context="ArgumentsTestBrack" />
-- <WordDetect attribute="Control Flow" String="begin" context="begin" beginRegion="begin" />
-- <WordDetect attribute="Control Flow" String="for" context="for" beginRegion="for" />
-- <WordDetect attribute="Control Flow" String="function" context="function" beginRegion="function" />
-- <WordDetect attribute="Control Flow" String="if" context="if" beginRegion="if" />
-- <WordDetect attribute="Control Flow" String="switch" context="switch" beginRegion="switch" />
-- <WordDetect attribute="Control Flow" String="while" context="while" beginRegion="while" />
-- </context>
--
-- <context name="command_builtin" attribute="Normal Text" lineEndContext="#pop">
-- <LineContinue attribute="Escape" />
-- <RegExpr attribute="Option" String="-&alnumdash;*" />
-- <AnyChar attribute="Separator" context="#pop" String="&commandsep;" />
-- <IncludeRules context="Root" />
-- </context>
--
-- <context name="eval_exec" attribute="Normal Text" lineEndContext="#pop">
-- <DetectChar context="#pop" char=")" lookAhead="true"/>
-- <AnyChar attribute="Separator" context="#pop" String="&commandsep;" />
-- <IncludeRules context="FindStrings" />
-- <IncludeRules context="FindVarExpansion" />
-- <IncludeRules context="FindSubstitutions" />
-- <IncludeRules context="FindBraceExpansion" />
-- <IncludeRules context="FindPaths" />
-- <IncludeRules context="FindEscapes" />
-- <IncludeRules context="Root" />
-- </context>
--
-- <context name="set" attribute="Normal Text" lineEndContext="#pop">
-- <LineContinue attribute="Escape" />
-- <AnyChar attribute="Separator" context="#pop" String="&commandsep;" />
-- <RegExpr attribute="Option" String="-&alnumdash;*" />
-- <RegExpr attribute="Variable" String="&varname;" context="set_CheckSubscript" />
-- <IncludeRules context="FindVarExpansion" />
-- </context>
--
-- <!-- check set var[1] -->
-- <context name="set_CheckSubscript" attribute="Normal Text" fallthroughContext="#pop!Arguments" lineEndContext="#pop#pop">
-- <LineContinue attribute="Escape" context="set_CheckSubscript2"/>
-- <DetectChar attribute="Index" context="set_Subscript" char="["/>
-- </context>
-- <!-- check set var\
-- [1] -->
-- <context name="set_CheckSubscript2" attribute="Normal Text" fallthroughContext="#pop#pop!Arguments" lineEndContext="#pop#pop#pop">
-- <DetectChar attribute="Index" context="#pop!set_Subscript" char="["/>
-- </context>
--
-- <context name="set_Subscript" attribute="Index" lineEndContext="#pop#pop#pop">
-- <DetectChar attribute="Index" context="#pop#pop!Arguments" char="]" />
-- <IncludeRules context="InSubscript" />
-- </context>
--
-- <context name="string" attribute="Normal Text" lineEndContext="#pop">
-- <LineContinue attribute="Escape" />
-- <DetectSpaces attribute="Normal Text" />
-- <keyword attribute="Builtin" context="#pop!Arguments" String="stringsubcommands" />
-- <RegExpr attribute="Error" String="." />
-- </context>
--
-- <context name="read_vared" attribute="Normal Text" lineEndContext="#pop">
-- <LineContinue attribute="Escape" />
-- <RegExpr attribute="Option" String="-&alnumdash;*" />
-- <DetectChar attribute="Comment" context="Comment" char="#"/>
-- <AnyChar attribute="Separator" context="#pop" String="&commandsep;" />
-- <DetectChar context="#pop" char=")" lookAhead="true"/>
-- <IncludeRules context="FindStrings" />
-- <IncludeRules context="FindVarExpansion" />
-- <IncludeRules context="FindSubstitutions" />
-- <IncludeRules context="FindBraceExpansion" />
-- <IncludeRules context="FindEscapes" />
-- <RegExpr attribute="Variable" String="&varname;" />
-- </context>
--
-- <context name="ArgumentsTestBrack" attribute="Normal Text" lineEndContext="#pop">
-- <LineContinue attribute="Escape" />
-- <Detect2Chars attribute="Builtin" char=" " char1="]" context="#pop!ArgumentsNonePre" />
-- <AnyChar attribute="Error" context="#pop!DropRestOfLine" String="#&commandsep;&"/>
-- <IncludeRules context="ArgumentsTest" />
-- </context>
--
-- <context name="ArgumentsTest" attribute="Normal Text" lineEndContext="#pop">
-- <LineContinue attribute="Escape" />
-- <RegExpr attribute="Operator" context="DirectPath" String="-&testoptsfile; " />
-- <RegExpr attribute="Operator" String="-&testoptsother; |!=?|=| -eq | -ne | -gt | -ge | -lt | -le "/>
-- <AnyChar context="#pop" String="&commandsep;#" lookAhead="true"/>
-- <IncludeRules context="FindArgumentsCommon" />
-+ <DetectSpaces/>
-+ <IncludeRules context="##Comments"/>
-+ <DetectIdentifier/>
-+ </context>
-+ <!--
-+ @} Comment
-+ -->
-+
-+
-+ <!--
-+ @{ Command
-+ -->
-+
-+ <context name="CommandSimple" attribute="Normal Text">
-+ <WordDetect attribute="Builtin" String="test" context="#pop!test!FieldSep"/>
-+ <WordDetect attribute="Builtin" String="set" context="#pop!set!FieldSep"/>
-+ <WordDetect attribute="Control Flow" String="if" context="#pop!if" beginRegion="if"/>
-+ <WordDetect attribute="Control Flow" String="for" context="#pop!forbody!forin!FieldSep!VarNameWithoutBraceOrError!BlockSep4" beginRegion="for"/>
-+ <WordDetect attribute="Keyword" String="function" context="#pop!funcbody!funcopts!FieldSep!funcname!BlockSep4" beginRegion="function"/>
-+ <WordDetect attribute="Control Flow" String="switch" context="#pop!switchbody!switch!BlockSep2" beginRegion="switch"/>
-+ <WordDetect attribute="Control Flow" String="while" context="#pop!while" beginRegion="while"/>
-+ <WordDetect attribute="Control Flow" String="return" context="#pop!Arguments!FieldSep"/>
-+ <WordDetect attribute="Control Flow" String="break" context="#pop!ArgumentsNone!FieldSep"/>
-+ <WordDetect attribute="Control Flow" String="continue" context="#pop!ArgumentsNone!FieldSep"/>
-+ <WordDetect attribute="Builtin" String="string" context="#pop!string!FieldSep"/>
-+ <WordDetect attribute="Builtin" String="read" context="#pop!read_vared!FieldSep"/>
-+ <WordDetect attribute="Builtin" String="vared" context="#pop!read_vared!FieldSep"/>
-+ <WordDetect attribute="Keyword" String="begin" context="#pop!beginbody" beginRegion="begin"/>
-+ <WordDetect attribute="Builtin" String="command" context="#pop!command_builtin!FieldSep"/>
-+ <WordDetect attribute="Builtin" String="builtin" context="#pop!command_builtin!FieldSep"/>
-+ <WordDetect attribute="Builtin" String="eval" context="#pop!eval!FieldSep"/>
-+ <WordDetect attribute="Builtin" String="time" context="#pop"/>
-+ <WordDetect attribute="Builtin" String="exec" context="#pop"/>
-+ <keyword String="commands" attribute="Builtin" context="#pop!Arguments!FieldSep"/>
-+ <keyword String="commandsnoargs" attribute="Builtin" context="#pop!ArgumentsNone!FieldSep"/>
-+ <keyword String="commandsstay" attribute="Control Flow" context="#pop"/>
-+ <keyword String="unixcommands" attribute="UnixCommand" context="#pop!Arguments!FieldSep"/>
-+ <RegExpr String="&simple_command;" attribute="Command" context="#pop!Arguments!FieldSep"/>
-+ </context>
-+
-+ <context name="CommandPart" attribute="CommandPath" lineEndContext="#pop#pop#pop" fallthroughContext="#pop!CommandName">
-+ <IncludeRules context="CommandName"/>
-+ <RegExpr String="&command_dir;" attribute="CommandPath"/>
-+ <RegExpr String="(?<=^|/['"]?)&simple_command;&is_end_of_simple_cmd;" lookAhead="1" context="CommandPartCommand"/>
-+ </context>
-+ <context name="CommandPartCommand" attribute="Error">
-+ <keyword String="unixcommands" attribute="UnixCommand" context="#pop#pop"/>
-+ <RegExpr String="&simple_command;" attribute="Command" context="#pop#pop"/>
-+ </context>
-+
-+ <context name="CommandName" attribute="Command" lineEndContext="#pop#pop#pop">
-+ <IncludeRules context="PopWhenSep"/>
-+ <IncludeRules context="FindStrings"/>
-+ <IncludeRules context="FindVarExpansion"/>
-+ <IncludeRules context="FindCommandEscape"/>
-+ <IncludeRules context="FindGlob"/>
-+ <IncludeRules context="FindBraceExpansion"/>
-+ <DetectChar char="(" attribute="Error" context="#pop!CommandSubstitution"/>
-+ </context>
-+
-+ <!--
-+ @} Command
-+ -->
-+
-+
-+ <!--
-+ @{ Builtin
-+ -->
-+
-+ <!--
-+ command -opt cmd
-+ ~~~~~~~~
-+ -->
-+ <context name="command_builtin" attribute="Normal Text" lineEndContext="#pop" fallthroughContext="#pop">
-+ <IncludeRules context="FindOption_then_FieldSep"/>
-+ </context>
-+
-+ <!--
-+ eval (command) ...
-+ eval command ...
-+ ~~~~~~~~~~~~~
-+ -->
-+ <context name="eval" attribute="Normal Text" lineEndContext="#pop" fallthroughContext="#pop">
-+ <StringDetect String="(" attribute="Keychar" context="#pop!Arguments!CommandSubstitution"/>
-+ <StringDetect String="{" lookAhead="1" context="#pop!Arguments!FieldSep!CommandName"/>
-+ </context>
-+
-+
-+ <!--
-+ set name values...
-+ -->
-+ <context name="set" attribute="Error" lineEndContext="#pop"
-+ fallthroughContext="#pop!Arguments!FieldSep!VarNameWithSubscriptOrError">
-+ <IncludeRules context="FindOption_then_FieldSep"/>
-+ </context>
-+
-+
-+ <!--
-+ string func params
-+ -->
-+ <context name="string" attribute="Error" lineEndContext="#pop" fallthroughContext="#pop!Arguments">
-+ <keyword String="stringsubcommands" attribute="Builtin" context="#pop!Arguments!FieldSep"/>
-+ <DetectIdentifier attribute="Error" context="#pop!Arguments!FieldSep"/>
-+ <Int attribute="Error" context="#pop!Arguments!FieldSep"/>
-+ </context>
-+
-+
-+ <!--
-+ read -xy var
-+ -->
-+ <context name="read_vared" attribute="Error" lineEndContext="#pop" fallthroughContext="FieldSep!VarNameOrError">
-+ <IncludeRules context="FindOption_then_FieldSep"/>
-+ </context>
-+
-+
-+ <!--
-+ test $var -eq abc
-+ -->
-+ <context name="test" attribute="Normal Text" lineEndContext="#pop" fallthroughContext="FieldSep!ArgMaybePath">
-+ <AnyChar String="*?" attribute="Glob" context="FieldSep!ArgPath"/>
-+ <DetectChar char="~" lookAhead="1" context="FieldSep!ArgMaybeHome"/>
-+ <RegExpr String="-[bcdefgGkLOprsStuwx]&is_end_of_text;" attribute="Operator"
-+ context="DirectPath_then_FieldSep"/>
-+ <RegExpr String="(-[nzao]|!|!?=|-eq|-ne|-gt|-ge|-lt|-le|-nt|-ot|-ef)&is_end_of_text;"
-+ attribute="Operator" context="FieldSep"/>
- </context>
-
-- <context name="begin" attribute="Normal Text" lineEndContext="beginbody">
-- <DetectSpaces attribute="Normal Text" />
-- <DetectChar attribute="Separator" context="beginbody" char=";" />
-- <IncludeRules context="Root" />
-- </context>
--
-- <context name="beginbody" attribute="Normal Text" lineEndContext="#stay">
-- <LineContinue attribute="Escape" />
-- <WordDetect attribute="Control Flow" String="end" context="#pop#pop" endRegion="begin" />
-- <IncludeRules context="Root" />
-+
-+ <!--
-+ [ $var -eq abc ]
-+ -->
-+ <context name="ArgumentsTestBrack" attribute="Normal Text" lineEndContext="#pop" fallthroughContext="FieldSep!ArgMaybePath">
-+ <IncludeRules context="test"/>
-+ <RegExpr String="(^\]|(?<=[&white;])\])(?=\\?$|[&white;|&;<>])" attribute="Builtin" context="#pop!ArgumentsNone!FieldSep"/>
- </context>
-
-- <context name="for" attribute="Normal Text" lineEndContext="#stay">
-- <LineContinue attribute="Escape" />
-- <DetectSpaces attribute="Normal Text" />
-- <WordDetect attribute="Control Flow" String="in" context="forargs" />
-- <RegExpr attribute="Variable" String="&varname;" />
-- <IncludeRules context="FindVarExpansion" />
-- <RegExpr attribute="Error" String="."/>
-+
-+ <!--
-+ begin cmd ; end
-+ -->
-+ <context name="beginbody" attribute="Normal Text" fallthroughContext="Arguments!FieldSep!CommandName">
-+ <WordDetect String="end" attribute="Keyword" context="#pop" endRegion="begin"/>
-+ <IncludeRules context="Root"/>
- </context>
-
-- <context name="forargs" attribute="Normal Text" lineEndContext="forbody">
-- <DetectChar attribute="Separator" context="forbody" char=";" />
-- <DetectChar attribute="Comment" context="Comment" char="#"/>
-- <IncludeRules context="FindArgumentsCommon" />
-+
-+ <!--
-+ if CONDITION; COMMANDS_TRUE ...;
-+ [else if CONDITION2; COMMANDS_TRUE2 ...;]
-+ [else; COMMANDS_FALSE ...;]
-+ end
-+ -->
-+ <context name="if" attribute="Normal Text" fallthroughContext="Arguments!FieldSep!CommandName">
-+ <WordDetect attribute="Control Flow" String="else" context="else" endRegion="if" beginRegion="if"/>
-+ <WordDetect String="end" attribute="Control Flow" context="#pop" endRegion="if"/>
-+ <IncludeRules context="Root"/>
- </context>
-
-- <context name="forbody" attribute="Normal Text" lineEndContext="#stay">
-- <LineContinue attribute="Escape" />
-- <WordDetect attribute="Control Flow" String="end" context="#pop#pop#pop" endRegion="for" />
-- <IncludeRules context="Root" />
-+ <context name="else" attribute="Normal Text" fallthroughContext="#pop">
-+ <IncludeRules context="FindEmpty"/>
-+ <WordDetect String="if" attribute="Control Flow" context="#pop"/>
- </context>
-
-- <context name="function" attribute="Normal Text" lineEndContext="funcbody">
-- <LineContinue attribute="Escape" />
-- <DetectSpaces attribute="Normal Text" />
-- <DetectChar attribute="Comment" context="func_comment" char="#"/>
-- <DetectChar context="funcopts" char="-" lookAhead="true" />
-- <DetectChar attribute="Separator" context="funcbody" char=";" />
-- <RegExpr attribute="Command" String="&funcname;" />
-- <IncludeRules context="FindVarExpansion" />
-- <RegExpr attribute="Error" String="."/>
-+
-+ <!--
-+ for VARNAME in [VALUES ...]; COMMANDS ...; end
-+ -->
-+ <context name="forin" attribute="Error"
-+ lineEndContext="#pop!Arguments!BlockSep2"
-+ fallthroughContext="#pop!Arguments!BlockSep2">
-+ <WordDetect attribute="Keyword" String="in" context="#pop!Arguments!BlockSep2"/>
-+ <DetectIdentifier attribute="Error" context="#pop!Arguments!BlockSep2"/>
-+ <Int attribute="Error" context="#pop!Arguments!BlockSep2"/>
-+ </context>
-+ <context name="forbody" attribute="Normal Text" fallthroughContext="Arguments!FieldSep!CommandName">
-+ <WordDetect String="end" attribute="Control Flow" context="#pop" endRegion="for"/>
-+ <IncludeRules context="Root"/>
-+ </context>
-+
-+
-+ <!--
-+ function NAME [OPTIONS]; BODY; end
-+ -->
-+ <context name="funcname" attribute="Command" lineEndContext="#pop#pop#pop">
-+ <IncludeRules context="PopWhenSep"/>
-+ <DetectChar char="/" attribute="Error"/>
-+ <IncludeRules context="FindFishExpr"/>
- </context>
-
-- <context name="func_comment" attribute="Comment" lineEndContext="#pop!funcbody">
-+ <context name="funcopts" attribute="Normal Text" lineEndContext="#pop" fallthroughContext="FieldSep!func_arg">
-+ <IncludeRules context="PopWhenSep"/>
-+ <DetectChar char="-" lookAhead="1" context="FieldSep!func_Option"/>
-+ </context>
-+ <context name="func_arg" attribute="Normal Text" lineEndContext="#pop#pop#pop">
-+ <IncludeRules context="PopWhenSep"/>
-+ <IncludeRules context="FindFishExpr"/>
- </context>
-
-- <context name="funcopts" attribute="Normal Text" lineEndContext="#pop!funcbody">
-- <DetectChar attribute="Comment" context="#pop!func_comment" char="#"/>
-+ <context name="func_Option" attribute="Normal Text">
- <RegExpr attribute="Option" String="(?:-d[&white;]*|--description=)(?=["'])" context="funcdesc" beginRegion="doc"/>
-- <RegExpr attribute="Option" String="-&alnumdash;*" />
-- <DetectChar attribute="Separator" context="#pop!funcbody" char=";" />
-- <IncludeRules context="FindArgumentsCommon" />
-+ <DetectChar char="-" attribute="Option" context="#pop!Option"/>
-+ </context>
-+ <!-- -d "..." / - -description="..." -->
-+ <context name="funcdesc" attribute="Function Doc">
-+ <DetectChar context="DocstringSQ" char="'"/>
-+ <DetectChar context="DocstringDQ" char="""/>
-+ </context>
-+ <context name="DocstringSQ" attribute="Function Doc">
-+ <DetectChar attribute="Function Doc" context="#pop#pop#pop" char="'" endRegion="doc"/>
-+ <IncludeRules context="StringSQ"/>
-+ </context>
-+ <context name="DocstringDQ" attribute="Function Doc">
-+ <DetectChar attribute="Function Doc" context="#pop#pop#pop" char=""" endRegion="doc"/>
-+ <IncludeRules context="StringDQ"/>
-+ </context>
-+
-+ <context name="funcbody" attribute="Normal Text" fallthroughContext="Arguments!FieldSep!CommandName">
-+ <WordDetect String="end" attribute="Control Flow" context="#pop" endRegion="function"/>
-+ <IncludeRules context="Root"/>
- </context>
-
-- <context name="funcdesc" attribute="Function Doc" lineEndContext="#stay">
-- <DetectChar context="DocstringSQ" char="'" />
-- <DetectChar context="DocstringDQ" char=""" />
-+
-+ <!--
-+ switch VALUE; [case [GLOB ...]; [COMMANDS ...]; ...] end
-+ -->
-+ <context name="switch" attribute="Normal Text" lineEndContext="#pop">
-+ <IncludeRules context="PopWhenSep"/>
-+ <IncludeRules context="FindFishExpr"/>
-+ </context>
-+
-+ <context name="switchbody" attribute="Normal Text" fallthroughContext="Arguments!FieldSep!CommandName">
-+ <WordDetect String="case" attribute="Control Flow" context="#pop!casebody!Arguments!FieldSep" beginRegion="case"/>
-+ <WordDetect String="end" attribute="Control Flow" context="#pop" endRegion="switch"/>
-+ <IncludeRules context="Root"/>
-+ </context>
-+
-+ <context name="casebody" attribute="Normal Text" fallthroughContext="Arguments!FieldSep!CommandName">
-+ <WordDetect String="case" attribute="Control Flow" context="Arguments!FieldSep" endRegion="case" beginRegion="case"/>
-+ <WordDetect String="end" lookAhead="1" context="switchend" endRegion="case"/>
-+ <IncludeRules context="Root"/>
-+ </context>
-+
-+ <context name="switchend" attribute="Normal Text">
-+ <WordDetect String="end" attribute="Control Flow" context="#pop#pop" endRegion="switch"/>
-+ </context>
-+
-+
-+ <!--
-+ while CONDITION ; ... ; end
-+ -->
-+ <context name="while" attribute="Normal Text" fallthroughContext="Arguments!FieldSep!CommandName">
-+ <WordDetect String="end" attribute="Control Flow" context="#pop" endRegion="while"/>
-+ <IncludeRules context="Root"/>
-+ </context>
-+
-+ <!--
-+ @} Builtin
-+ -->
-+
-+
-+ <!--
-+ @{ Option (-xy)
-+ -->
-+ <context name="FindOption_then_FieldSep" attribute="Normal Text">
-+ <DetectChar char="-" attribute="Option" context="FieldSep!Option"/>
-+ </context>
-+ <context name="Option" attribute="Option" lineEndContext="#pop#pop" fallthroughContext="#pop!ArgMaybePath">
-+ <IncludeRules context="PopWhenSep"/>
-+ <DetectChar char="=" attribute="Operator" context="#pop!ArgMaybePath"/>
-+ <RegExpr String="&option_name;" attribute="Option"/>
-+ <IncludeRules context="FindFishExpr"/>
-+ </context>
-+ <!--
-+ @} Option (-xy)
-+ -->
-+
-+
-+ <!--
-+ @{ Strings
-+ https://fishshell.com/docs/current/language.html#quotes
-+ -->
-+
-+ <!-- FindStrings looks for single and double quoted strings -->
-+ <context name="FindStrings" attribute="Normal Text">
-+ <DetectChar char="'" attribute="String SingleQ" context="StringSQ"/>
-+ <DetectChar char='"' attribute="String DoubleQ" context="StringDQ"/>
- </context>
-
- <!-- StringSQ consumes anything till ' -->
-- <context name="DocstringSQ" attribute="Function Doc" lineEndContext="#stay">
-+ <context name="StringSQ" attribute="String SingleQ">
-+ <DetectChar char="'" attribute="String SingleQ" context="#pop"/>
- <!--no line continuation here-->
-- <Detect2Chars attribute="Escape" char="\" char1="'" />
-- <Detect2Chars attribute="Escape" char="\" char1="\" />
-- <DetectChar attribute="Function Doc" context="#pop#pop" char="'" endRegion="doc"/>
-+ <StringDetect String="\'" attribute="Escape"/>
-+ <StringDetect String="\\" attribute="Escape"/>
- </context>
-
- <!-- StringDQ consumes anything till ", substitutes vars and expressions -->
-- <context name="DocstringDQ" attribute="Function Doc" lineEndContext="#stay">
-- <LineContinue attribute="Escape" />
-- <Detect2Chars attribute="Escape" char="\" char1=""" />
-- <Detect2Chars attribute="Escape" char="\" char1="$" />
-- <Detect2Chars attribute="Escape" char="\" char1="\" />
-- <IncludeRules context="FindVarExpansion" />
-- <DetectChar attribute="Function Doc" context="#pop#pop" char=""" endRegion="doc"/>
-+ <context name="StringDQ" attribute="String DoubleQ">
-+ <DetectChar char='"' attribute="String DoubleQ" context="#pop"/>
-+ <StringDetect String='\"' attribute="Escape"/>
-+ <StringDetect String="\$" attribute="Escape"/>
-+ <StringDetect String="\\" attribute="Escape"/>
-+ <LineContinue attribute="Escape"/>
-+ <IncludeRules context="FindVarExpansion"/>
- </context>
-
-- <context name="funcbody" attribute="Normal Text" lineEndContext="#stay">
-- <LineContinue attribute="Escape" />
-- <WordDetect attribute="Control Flow" String="end" context="#pop#pop" endRegion="function" />
-- <IncludeRules context="Root" />
-+ <!--
-+ @} Strings
-+ -->
-+
-+
-+ <!--
-+ @{ $var and $(command)
-+ -->
-+
-+ <context name="FindVarExpansion" attribute="Normal Text">
-+ <StringDetect String="$" lookAhead="1" context="Variable"/>
- </context>
-
-- <context name="if" attribute="Normal Text" lineEndContext="#stay">
-- <LineContinue attribute="Escape"/>
-- <WordDetect attribute="Control Flow" String="else" context="else" endRegion="if" beginRegion="if"/>
-- <WordDetect attribute="Control Flow" String="end" context="#pop" endRegion="if"/>
-- <IncludeRules context="Root" />
-+ <!-- $(command) -->
-+ <context name="DollarCommandSubstitution" attribute="Variable">
-+ <StringDetect String="$" attribute="Variable"/>
-+ <StringDetect String="(" attribute="Keychar" context="#pop#pop!CommandSubstitution"/>
- </context>
-
-- <context name="else" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="#pop">
-- <DetectSpaces attribute="Normal Text" context="#stay"/>
-- <LineContinue attribute="Escape" context="#stay"/>
-- <WordDetect attribute="Control Flow" String="if" context="#pop"/>
-+ <!-- $var -->
-+ <context name="Variable" attribute="Variable" lineEndContext="#pop" fallthroughContext="#pop">
-+ <StringDetect String="$(" lookAhead="1" context="DollarCommandSubstitution"/>
-+ <RegExpr String="(\$+&varname;|\$(?=\\$))++" attribute="Variable" context="#pop!VarName"/>
-+ <StringDetect String="$$" lookAhead="1" context="PrefixDollar!PrefixDollar2"/>
-+ <StringDetect String="$" attribute="Error" context="#pop!VarName"/>
-+ </context>
-+ <context name="VarName" attribute="Error" lineEndContext="#pop" fallthroughContext="#pop">
-+ <DetectChar char="[" attribute="Index" context="#pop!InSubscript"/>
-+ <LineContinue attribute="Escape" context="VarNameContinue"/>
-+ </context>
-+ <context name="VarNameContinue" attribute="Error" lineEndContext="#pop#pop" fallthroughContext="#pop#pop">
-+ <RegExpr String="\w+" attribute="Variable" context="#pop"/>
-+ </context>
-+ <!-- $$$
-+ ~~ Variable
-+ ~ Error
-+ -->
-+ <context name="PrefixDollar" attribute="Variable">
-+ <StringDetect String="$$" lookAhead="1" context="PrefixDollar2"/>
-+ <StringDetect String="$" attribute="Error" context="#pop"/>
-+ </context>
-+ <context name="PrefixDollar2" attribute="Variable">
-+ <StringDetect String="$" attribute="Variable" context="#pop"/>
- </context>
-
-- <context name="switch" attribute="Normal Text" lineEndContext="switchbody">
-- <DetectChar attribute="Separator" context="switchbody" char=";" />
-- <DetectChar attribute="Comment" context="Comment" char="#"/>
-- <IncludeRules context="FindArgumentsCommon" />
-+ <!-- var[1..2+3-1]
-+ ~~~~~~~~~~
-+ -->
-+ <context name="FindSubscript" attribute="Index">
-+ <DetectChar char="[" attribute="Index" context="InSubscript"/>
-+ </context>
-+ <context name="Subscript" attribute="Index" lineEndContext="#pop" fallthroughContext="#pop">
-+ <LineContinue attribute="Escape"/>
-+ <DetectChar attribute="Index" context="#pop!InSubscript" char="["/>
-+ </context>
-+ <context name="InSubscript" attribute="Error" lineEndContext="#pop" fallthroughContext="#pop">
-+ <StringDetect String="]" attribute="Index" context="#pop!Subscript"/>
-+ <StringDetect String="..." attribute="Error"/>
-+ <RegExpr String="(\.\.(?=[^.]|$)|[-+]?[0-9]++|\s)*+" attribute="Index"/>
-+ <AnyChar String="-+" attribute="Error"/>
-+ <IncludeRules context="FindVarExpansion"/>
-+ <IncludeRules context="FindSubstitutions"/>
-+ <IncludeRules context="FindStrings"/>
-+ <LineContinue attribute="Escape"/>
-+ <RegExpr String="[^&path_sym_sep;]" attribute="Error" context="#pop"/>
- </context>
-
-- <context name="switchbody" attribute="Normal Text" lineEndContext="#stay">
-- <LineContinue attribute="Escape" />
-- <WordDetect attribute="Control Flow" String="case" context="case" beginRegion="case" />
-- <WordDetect attribute="Control Flow" String="end" context="#pop#pop" endRegion="switch"/>
-- <IncludeRules context="Root" />
-+ <!--
-+ @} $var and $(command)
-+ -->
-+
-+
-+ <!--
-+ @{ Variable name
-+ -->
-+ <context name="VarNameOrError" attribute="Error" lineEndContext="#pop#pop">
-+ <IncludeRules context="PopWhenSep"/>
-+ <RegExpr String="&varname;" attribute="Variable"/>
-+ <IncludeRules context="FindFishExpr"/>
- </context>
-
-- <context name="case" attribute="Normal Text" lineEndContext="casebody">
-- <DetectChar attribute="Separator" context="casebody" char=";" />
-- <DetectChar attribute="Comment" context="Comment" char="#"/>
-- <IncludeRules context="FindArgumentsCommon" />
-+ <context name="VarNameWithoutBraceOrError" attribute="Error" lineEndContext="#pop#pop">
-+ <IncludeRules context="PopWhenSep"/>
-+ <RegExpr String="&varname;" attribute="Variable"/>
-+ <IncludeRules context="FindFishExprWithoutBrace"/>
- </context>
-
-- <context name="casebody" attribute="Normal Text" lineEndContext="#stay">
-- <LineContinue attribute="Escape" />
-- <WordDetect attribute="Control Flow" String="case" context="#pop" endRegion="case" beginRegion="case" />
-- <WordDetect attribute="Control Flow" String="end" context="#pop#pop" endRegion="case" lookAhead="1"/>
-- <IncludeRules context="Root" />
-+ <context name="VarNameWithSubscriptOrError" attribute="Error" lineEndContext="#pop#pop#pop">
-+ <IncludeRules context="FindSubscript"/>
-+ <IncludeRules context="VarNameOrError"/>
- </context>
-+ <!--
-+ @} Variable name
-+ -->
-
-- <context name="while" attribute="Normal Text" lineEndContext="#stay">
-- <LineContinue attribute="Escape" />
-- <WordDetect attribute="Control Flow" String="end" context="#pop" endRegion="while"/>
-- <IncludeRules context="Root" />
-+
-+ <!--
-+ @{ Spaces and separators
-+ -->
-+ <!-- #pop#pop when end command, otherwise #pop -->
-+ <context name="FieldSep" attribute="Normal Text"
-+ lineEndContext="#pop#pop" fallthroughContext="#pop">
-+ <IncludeRules context="FindEmpty"/>
-+ <DetectChar char="#" attribute="Comment" context="#pop#pop!Comment"/>
-+ <AnyChar String="&<>0123456789" lookAhead="1" context="MaybeRedirection"/>
-+ <AnyChar String="|;" attribute="Separator" context="#pop#pop"/>
-+ <AnyChar String=")}" lookAhead="1" context="#pop#pop"/>
-+ </context>
-+
-+ <!-- #pop(2) when special chars or end command, otherwise #pop -->
-+ <context name="BlockSep2" attribute="Normal Text"
-+ lineEndContext="#pop#pop" fallthroughContext="#pop">
-+ <IncludeRules context="FindEmpty"/>
-+ <AnyChar String="&blocksep;" lookAhead="1" context="#pop#pop"/>
-+ </context>
-+ <!-- #pop(4) when special chars or end command, otherwise #pop -->
-+ <context name="BlockSep4" attribute="Normal Text"
-+ lineEndContext="#pop#pop#pop#pop" fallthroughContext="#pop">
-+ <IncludeRules context="FindEmpty"/>
-+ <AnyChar String="&blocksep;" lookAhead="1" context="#pop#pop#pop#pop"/>
-+ </context>
-+
-+ <context name="FindEmpty" attribute="Normal Text">
-+ <DetectSpaces attribute="Normal Text"/>
-+ <LineContinue attribute="Escape" context="CommentSep"/>
-+ </context>
-+ <!--
-+ echo before comment \
-+ # comment
-+ # comment 2
-+ after comment # just another argument -->
-+ <context name="CommentSep" attribute="Normal Text" fallthroughContext="#pop">
-+ <DetectSpaces attribute="Normal Text"/>
-+ <LineContinue attribute="Escape"/>
-+ <IncludeRules context="FindComment"/>
- </context>
-
-- <!--Argument Rules match the items after a command
-- this one is a collection with the common part for inclusion-->
-- <context name="Arguments" attribute="Normal Text" lineEndContext="#pop">
-- <AnyChar context="#pop" String="&commandsep;)" lookAhead="true"/>
-- <DetectChar attribute="Comment" context="Comment" char="#"/>
-- <IncludeRules context="FindArgumentsCommon" />
-- </context>
--
-- <context name="FindArgumentsCommon" attribute="Normal Text" lineEndContext="#stay">
-- <LineContinue context="ArgumentPotentialMultiLineComment" lookAhead="1"/>
-- <DetectSpaces attribute="Normal Text" />
-- <RegExpr attribute="Option" String="-&alnumdash;*" />
-- <RegExpr attribute="Redirection" context="Redirect" String="[0-9]*(?:>{1,2}|<|\^{1,2})" />
-- <DetectChar attribute="Operator" char="="/>
-- <IncludeRules context="FindStrings" />
-- <IncludeRules context="FindVarExpansion" />
-- <IncludeRules context="FindSubstitutions" />
-- <IncludeRules context="FindBraceExpansion" />
-- <IncludeRules context="FindProcessExpansion" />
-- <IncludeRules context="FindPaths" />
-- <IncludeRules context="FindEscapes" />
-- <RegExpr attribute="Normal Text" String="[^&separator;&special;]*" /> <!--unknown token-->
-- </context>
--
-- <!-- check \ preceded by a space -->
-- <context name="ArgumentPotentialMultiLineComment" attribute="Comment">
-- <RegExpr attribute="Escape" context="ArgumentComment" String="(?<=\s)\\$" />
-- <LineContinue attribute="Escape" context="#pop"/>
-+ <!-- #pop when cmd separator -->
-+ <context name="PopWhenSep" attribute="Normal Text">
-+ <AnyChar String="&white;|;<>)}" lookAhead="1" context="#pop"/>
-+ <AnyChar String="&" lookAhead="1" context="PopWhenSep_amp"/>
-+ </context>
-+ <context name="PopWhenSep_amp" attribute="Normal Text" fallthroughContext="#pop#pop">
-+ <RegExpr String="&text_amp;|" context="#pop"/>
- </context>
-+ <!--
-+ @} Spaces and separators
-+ -->
-+
-+
-+ <!--
-+ @{ Redirection
-+ -->
-+ <context name="MaybeRedirection" attribute="Normal Text" lineEndContext="#pop#pop#pop" fallthroughContext="#pop#pop">
-+ <StringDetect String="&&" attribute="Separator" context="#pop#pop#pop"/>
-+ <StringDetect String="&|" attribute="Redirection" context="#pop#pop#pop"/>
-+ <StringDetect String="&>>" attribute="Separator" context="Redirect"/>
-+ <StringDetect String="&>" attribute="Separator" context="Redirect"/>
-+ <StringDetect String="&" attribute="Separator" context="#pop#pop#pop"/>
-+ <RegExpr String="[0-9]*(>>?|<)" attribute="Redirection" context="Redirect"/>
-+ </context>
-+
-+ <context name="Redirect" attribute="Redirection" lineEndContext="#pop#pop#pop#pop" fallthroughContext="#pop#pop#pop!DirectPath_then_FieldSep">
-+ <DetectChar char="?" attribute="Redirection"
-+ context="#pop#pop#pop!DirectPath_then_FieldSep"/>
-+ <DetectChar char="|" attribute="Redirection" context="#pop#pop#pop#pop"/>
-+ <DetectChar char="&" lookAhead="1" context="RedirectMaybeFd"/>
-+ </context>
-+ <!-- cmd >&N
-+ ~~~ Redirection
-+ cmd >&
-+ ~ Error
-+ -->
-+ <context name="RedirectMaybeFd" attribute="Redirection" lineEndContext="#pop#pop#pop#pop#pop" fallthroughContext="#pop#pop#pop#pop">
-+ <RegExpr String="&(?:[0-9]+|-|(?=['"$(]|\\$))" attribute="Redirection" context="#pop#pop#pop#pop!FieldSep!Fd"/>
-+ <DetectChar char="&" attribute="Error"
-+ context="#pop#pop#pop#pop!DirectPath_then_FieldSep"/>
-+ </context>
-+ <context name="Fd" attribute="Redirection" lineEndContext="#pop#pop#pop" fallthroughContext="#pop">
-+ <AnyChar String="&white;|;<>)}&" lookAhead="1" context="#pop"/>
-+ <LineContinue attribute="Escape"/>
-+ <DetectIdentifier attribute="Error" context="#pop"/>
-+ <AnyChar String="'"$(\" lookAhead="1" context="#pop!FdDigit"/>
-+ </context>
-+ <context name="FdDigit" attribute="Error" lineEndContext="#pop#pop#pop">
-+ <IncludeRules context="PopWhenSep"/>
-+ <AnyChar String="0123456789" attribute="Redirection"/>
-+ <IncludeRules context="FindFishExprWithoutBrace"/>
-+ <RegExpr String="." attribute="Error" context="#pop"/>
-+ </context>
-+ <!--
-+ @} Redirection
-+ -->
-+
-
-- <context name="ArgumentComment" attribute="Comment" fallthroughContext="#pop#pop">
-+ <!--
-+ @{ Path
-+ -->
-+ <!-- DirectPath is used at places where a path is expected (e.g. test -f file) -->
-+ <context name="DirectPath_then_FieldSep" attribute="Path" lineEndContext="#pop#pop" fallthroughContext="#pop!FieldSep!DirectPathTail!Home">
- <DetectSpaces attribute="Normal Text"/>
-- <DetectChar context="Comment" char="#"/>
-+ <DetectChar char="#" attribute="Error" context="#pop#pop!Comment"/>
-+ <AnyChar String="&|;" attribute="Error" context="#pop#pop"/>
-+ <AnyChar String="<>" attribute="Error" context="#pop!FieldSep"/>
-+ <LineContinue attribute="Escape"/>
- </context>
-
-- <context name="ArgumentsNonePre" attribute="Normal Text" lineEndContext="#pop">
-- <LineContinue attribute="Escape" />
-- <DetectSpaces attribute="Normal Text" context="#pop!ArgumentsNone" />
-- <AnyChar context="#pop" String="&commandsep;" lookAhead="true"/> <!--consumed on the "Find"-Level-->
-- <RegExpr attribute="Error" String="."/>
-+ <context name="Home" attribute="Path" lineEndContext="#pop#pop" fallthroughContext="#pop">
-+ <RegExpr String="&homedir;" attribute="HomeDir" context="#pop"/>
- </context>
-
-- <context name="ArgumentsNone" attribute="Normal Text" lineEndContext="#pop">
-- <LineContinue attribute="Escape" />
-- <DetectSpaces attribute="Normal Text" />
-- <DetectChar attribute="Comment" context="Comment" char="#"/>
-- <RegExpr attribute="Redirection" context="Redirect" String="[0-9]*(?:>{1,2}|<|\^{1,2})" />
-- <AnyChar context="#pop" String="&commandsep;)" lookAhead="true"/> <!--consumed on the "Find"-Level-->
-- <RegExpr attribute="Error" String="[^&commandsep;#]*"/>
-+ <!-- Path with error for brace ({abc,def}) -->
-+ <context name="DirectPathTail" attribute="Path" lineEndContext="#pop#pop">
-+ <IncludeRules context="PopWhenSep"/>
-+ <IncludeRules context="FindStrings"/>
-+ <IncludeRules context="FindVarExpansion"/>
-+ <IncludeRules context="FindSubstitutions"/>
-+ <IncludeRules context="FindEscape"/>
-+ <IncludeRules context="FindGlob"/>
-+ <IncludeRules context="FindNoBraceOrError"/>
- </context>
-+ <!--
-+ @} Path
-+ -->
-+
-
-- <context name="TokEnd" attribute="Normal Text" lineEndContext="#pop">
-- <LineContinue attribute="Escape" />
-- <DetectSpaces attribute="Normal Text" context="#pop"/>
-- <AnyChar context="#pop" String="&commandsep;" lookAhead="true"/> <!--consumed on the "Find"-Level-->
-- <RegExpr attribute="Error" String="." context="#pop"/>
-+ <!--
-+ @{ Escape
-+ https://fishshell.com/docs/current/language.html#escaping-characters
-+ -->
-+ <context name="FindEscape" attribute="Normal Text">
-+ <DetectChar char="\" lookAhead="1" context="Escape"/>
-+ </context>
-+ <context name="Escape" attribute="Escape">
-+ <LineContinue attribute="Escape" context="#pop"/>
-+ <RegExpr String="&escape_chars;" attribute="Escape" context="#pop"/>
-+ <RegExpr String="\\." attribute="Error" context="#pop"/>
- </context>
-
-- <context name="Redirect" attribute="Redirection" fallthroughContext="#pop!DirectPath" lineEndContext="#stay">
-- <LineContinue attribute="Escape" />
-- <DetectChar attribute="Redirection" context="#pop!DirectPath" char="?"/>
-- <DetectChar attribute="Redirection" context="#pop#pop" char="|"/>
-- <RegExpr attribute="Redirection" context="#pop!TokEnd" String="&(?:[0-9]+|-)" />
-+ <context name="FindCommandEscape" attribute="Normal Text">
-+ <DetectChar char="\" lookAhead="1" context="CommandEscape"/>
-+ </context>
-+ <context name="CommandEscape" attribute="Escape">
-+ <StringDetect String="\ " attribute="Command" context="#pop"/>
-+ <IncludeRules context="Escape"/>
- </context>
-
-- <context name="InSubscript" attribute="Index" lineEndContext="#pop">
-- <Detect2Chars char="." char1="." />
-- <LineContinue attribute="Escape" />
-- <RegExpr attribute="Index" String=" *-?\d+" />
-- <IncludeRules context="FindVarExpansion" />
-- <IncludeRules context="FindSubstitutions" />
-- <DetectSpaces attribute="Normal Text" />
-- <RegExpr attribute="Error" String="[^\]]" />
-+ <context name="FindBraceEscape" attribute="Normal Text">
-+ <DetectChar char="\" lookAhead="1" context="BraceEscape"/>
- </context>
-+ <context name="BraceEscape" attribute="Escape">
-+ <LineContinue attribute="Escape" context="#pop"/>
-+ <RegExpr String="\\,|&escape_chars;" attribute="Escape" context="#pop"/>
-+ <RegExpr String="\\." attribute="Error" context="#pop"/>
-+ </context>
-+ <!--
-+ @} Escape
-+ -->
-
-- <context name="Subscript" attribute="Index" lineEndContext="#pop">
-- <DetectChar attribute="Index" context="#pop" char="]" />
-- <IncludeRules context="InSubscript" />
-+
-+ <!--
-+ @{ Substitution
-+ -->
-+ <context name="FindSubstitutions" attribute="Normal Text">
-+ <DetectChar char="(" attribute="Keychar" context="CommandSubstitution"/>
- </context>
-
-- <!-- FindStrings looks for single and double quoted strings -->
-- <context name="FindStrings" attribute="Normal Text" lineEndContext="#stay">
-- <DetectChar context="StringSQ" char="'" />
-- <DetectChar context="StringDQ" char=""" />
-+ <context name="CommandSubstitution" attribute="Normal Text" fallthroughContext="Arguments!FieldSep!CommandName">
-+ <DetectChar char=")" attribute="Keychar" context="#pop!Subscript"/>
-+ <IncludeRules context="Root"/>
- </context>
-+ <!--
-+ @} Substitution
-+ -->
-
-- <!-- StringSQ consumes anything till ' -->
-- <context name="StringSQ" attribute="String SingleQ" lineEndContext="#stay">
-- <!--no line continuation here-->
-- <Detect2Chars attribute="Escape" char="\" char1="'" />
-- <Detect2Chars attribute="Escape" char="\" char1="\" />
-- <DetectChar attribute="String SingleQ" context="#pop" char="'" />
-+
-+ <!--
-+ @{ Brace
-+ -->
-+ <!-- Brace Expansion consumes anything till } -->
-+ <context name="FindBraceExpansion" attribute="Normal Text">
-+ <DetectChar char="{" lookAhead="1" context="MaybeBraceList"/>
-+ </context>
-+ <context name="FindNoBraceOrError" attribute="Normal Text">
-+ <DetectChar char="{" lookAhead="1" context="NoBraceOrError"/>
-+ </context>
-+ <context name="FindRealBraceExpansion" attribute="Normal Text">
-+ <DetectChar char="{" attribute="Keychar" context="BraceList"/>
-+ </context>
-+ <context name="FindPathBraceExpansion" attribute="Normal Text">
-+ <DetectChar char="{" attribute="Keychar" context="PathBraceList"/>
- </context>
-
-- <!-- StringDQ consumes anything till ", substitutes vars and expressions -->
-- <context name="StringDQ" attribute="String DoubleQ" lineEndContext="#stay">
-- <LineContinue attribute="Escape" />
-- <Detect2Chars attribute="Escape" char="\" char1=""" />
-- <Detect2Chars attribute="Escape" char="\" char1="$" />
-- <Detect2Chars attribute="Escape" char="\" char1="\" />
-- <IncludeRules context="FindVarExpansion" />
-- <DetectChar attribute="String DoubleQ" context="#pop" char=""" />
-+ <context name="MaybeBraceList" attribute="Normal Text">
-+ <IncludeRules context="NoBrace"/>
-+ <DetectChar char="{" attribute="Keychar" context="#pop!BraceList"/>
-+ </context>
-+ <context name="NoBraceOrError" attribute="Normal Text">
-+ <IncludeRules context="NoBrace"/>
-+ <DetectChar char="{" attribute="Error" context="#pop!BraceList"/>
-+ </context>
-+ <context name="NoBrace" attribute="Normal Text">
-+ <RegExpr String="&nobrace_text;|" context="#pop"/>
- </context>
-
-- <!-- FindVarExpansion goes after anything starting with $ and and their escapes -->
-- <context name="FindVarExpansion" attribute="Normal Text" lineEndContext="#stay">
-- <RegExpr attribute="Variable" context="CheckSubscript" String="\$+&varname;" />
-+ <!--Note:
-+ Multiple lines are allowed in brace,
-+ but this is so rare that the syntax does not permit it,
-+ to prevent the entire document from changing color when } is missing.-->
-+ <context name="BraceList" attribute="Normal Text" lineEndContext="#pop#pop">
-+ <DetectChar char="}" attribute="Keychar" context="#pop"/>
-+ <DetectChar char="," attribute="Separator"/>
-+ <IncludeRules context="FindStrings"/>
-+ <IncludeRules context="FindVarExpansion"/>
-+ <IncludeRules context="FindSubstitutions"/>
-+ <IncludeRules context="FindBraceEscape"/>
-+ <IncludeRules context="FindGlob"/>
-+ <IncludeRules context="FindBraceExpansion"/>
-+ <DetectChar char=")" lookAhead="1" context="#pop#pop"/>
- </context>
-
-- <!-- Subscript consumes anything till ], marks as Variable -->
-- <context name="CheckSubscript" attribute="Index" lineEndContext="#pop" fallthroughContext="#pop">
-- <LineContinue attribute="Escape" />
-- <DetectChar attribute="Index" context="Subscript" char="["/>
-+ <context name="PathBraceList" attribute="Path" lineEndContext="#pop#pop">
-+ <IncludeRules context="BraceList"/>
-+ </context>
-+ <!--
-+ @} Brace
-+ -->
-+
-+
-+ <!--
-+ @} Glob
-+ -->
-+ <context name="FindGlob" attribute="Error">
-+ <AnyChar String="*?" attribute="Glob"/>
- </context>
-+ <!--
-+ @} Glob
-+ -->
-+
-
-- <!-- Command Substitution -->
-- <context name="FindSubstitutions" attribute="Normal Text" lineEndContext="#stay">
-- <DetectChar attribute="Keychar" context="CommandSubstitution" char="(" />
-+ <!--
-+ @} Expression
-+ -->
-+ <context name="FindFishExpr" attribute="Error">
-+ <IncludeRules context="FindFishExprWithoutBrace"/>
-+ <IncludeRules context="FindBraceExpansion"/>
- </context>
-
-- <context name="CommandSubstitution" attribute="Normal Text" fallthroughContext="Root" lineEndContext="#stay">
-- <LineContinue attribute="Escape" />
-- <DetectChar attribute="Keychar" context="CommandSubstitutionCheckSubscript" char=")" />
-+ <context name="FindFishExprWithoutBrace" attribute="Error">
-+ <IncludeRules context="FindStrings"/>
-+ <IncludeRules context="FindVarExpansion"/>
-+ <IncludeRules context="FindSubstitutions"/>
-+ <IncludeRules context="FindEscape"/>
-+ <IncludeRules context="FindGlob"/>
- </context>
-+ <!--
-+ @{ Expression
-+ -->
-
-- <!-- check (...)[1] -->
-- <context name="CommandSubstitutionCheckSubscript" attribute="Normal Text" fallthroughContext="#pop#pop" lineEndContext="#pop#pop">
-- <LineContinue attribute="Escape" context="CommandSubstitutionCheckSubscript2"/>
-- <DetectChar attribute="Index" context="CommandSubstitutionSubscript" char="["/>
-+
-+ <!--
-+ @{ Arguments
-+ -->
-+ <!--Argument Rules match the items after a command
-+ this one is a collection with the common part for inclusion-->
-+ <context name="Arguments" attribute="Normal Text" lineEndContext="#pop" fallthroughContext="FieldSep!ArgMaybePath">
-+ <IncludeRules context="FindOption_then_FieldSep"/>
-+ <AnyChar String="*?" attribute="Glob" context="FieldSep!ArgPath"/>
-+ <DetectChar char="~" lookAhead="1" context="FieldSep!ArgMaybeHome"/>
- </context>
-- <!-- check (...)\
-- [1] -->
-- <context name="CommandSubstitutionCheckSubscript2" attribute="Normal Text" fallthroughContext="#pop#pop#pop" lineEndContext="#pop#pop#pop">
-- <DetectChar attribute="Index" context="#pop!CommandSubstitutionSubscript" char="["/>
-+ <context name="ArgMaybeHome" attribute="Path">
-+ <RegExpr String="&homedir;" attribute="HomeDir" context="#pop!ArgPath"/>
-+ <DetectChar char="~" attribute="Normal Text" context="#pop!ArgMaybePath"/>
- </context>
-
-- <context name="CommandSubstitutionSubscript" attribute="Index" lineEndContext="#pop#pop#pop">
-- <DetectChar attribute="Index" context="#pop#pop#pop" char="]" />
-- <IncludeRules context="InSubscript" />
-+ <context name="ArgMaybePath" attribute="Normal Text" lineEndContext="#pop">
-+ <IncludeRules context="PopWhenSep"/>
-+ <IncludeRules context="FindStrings"/>
-+ <IncludeRules context="FindVarExpansion"/>
-+ <IncludeRules context="FindSubstitutions"/>
-+ <IncludeRules context="FindEscape"/>
-+ <AnyChar String="*?" attribute="Glob" context="#pop!ArgPath"/>
-+ <RegExpr String="&path;" attribute="Path" context="#pop!ArgPath"/>
-+ <RegExpr String="&text;" attribute="Normal Text"/>
-+ <IncludeRules context="FindRealBraceExpansion"/>
- </context>
-
-- <!-- Brace Expansion consumes anything till } -->
-- <context name="FindBraceExpansion" attribute="Normal Text" lineEndContext="#stay">
-- <DetectChar attribute="Keychar" context="BraceList" char="{" />
-- <DetectChar attribute="Error" char="}" />
-- </context>
--
-- <context name="BraceList" attribute="Normal Text" lineEndContext="#pop">
-- <LineContinue attribute="Escape" />
-- <DetectChar attribute="Keychar" context="#pop" char="}" />
-- <DetectChar attribute="Separator" char="," />
-- <RegExpr attribute="Normal Text" String="&braceelement;*"/>
-- <IncludeRules context="FindStrings" />
-- <IncludeRules context="FindVarExpansion" />
-- <IncludeRules context="FindSubstitutions" />
-- <IncludeRules context="FindBraceExpansion" />
-- <IncludeRules context="FindPaths" />
-- <IncludeRules context="FindEscapes" />
-- <RegExpr attribute="Error" String="."/>
-- </context>
--
-- <!-- Process Expansion -->
-- <context name="FindProcessExpansion" attribute="Normal Text" lineEndContext="#pop">
-- <DetectChar attribute="Keychar" context="ProcessArg" char="%" />
-- </context>
--
-- <context name="ProcessArg" attribute="Process" lineEndContext="#pop">
-- <LineContinue attribute="Escape" />
-- <AnyChar context="#pop" String="&white;" />
-- <AnyChar context="#pop" String="&separator;" lookAhead="true" />
-- <DetectChar attribute="Comment" context="Comment" char="#"/>
-- <IncludeRules context="FindStrings" />
-- <IncludeRules context="FindVarExpansion" />
-- <IncludeRules context="FindSubstitutions" />
-- <IncludeRules context="FindBraceExpansion" />
-- <IncludeRules context="FindEscapes" />
-- </context>
--
-- <!-- FindPaths for parts which might be a path. Uses the matching of a / as heuristic -->
-- <!-- Might be fooled with quotes -->
-- <context name="FindPaths" attribute="Path" lineEndContext="#stay">
-- <RegExpr context="DirectPath" String="&pathdetect;" lookAhead="true" minimal="1"/>
-- </context>
--
-- <!-- DirectPath is used at places where the next part is definitely a path -->
-- <context name="DirectPath" attribute="Path" lineEndContext="#pop" fallthroughContext="#pop!PathHead" >
-- <LineContinue attribute="Escape" />
-- <DetectSpaces attribute="Normal Text" />
-- <AnyChar attribute="Error" context="#pop" String="#&commandsep;<>^" />
-- </context>
--
-- <context name="PathHead" attribute="Path" lineEndContext="#pop" fallthroughContext="#pop!Path" >
-- <LineContinue attribute="Escape" />
-- <RegExpr attribute="HomeDir" context="#pop!Path" String="&homedir;" />
-- </context>
--
-- <context name="Path" attribute="Path" lineEndContext="#pop">
-- <LineContinue attribute="Escape" />
-- <DetectSpaces context="#pop" lookAhead="true" />
-- <AnyChar context="#pop" String="#&commandsep;<>^)" lookAhead="true" />
-- <AnyChar attribute="Glob" String="*?" />
-- <DetectChar attribute="Path" char="/" />
-- <DetectChar attribute="Keychar" context="PathBrace" char="{" />
-- <DetectChar attribute="Error" context="#pop" char="}" />
-- <IncludeRules context="FindStrings" />
-- <IncludeRules context="FindVarExpansion" />
-- <IncludeRules context="FindSubstitutions" />
-- <IncludeRules context="FindEscapes" />
-- <RegExpr attribute="Path" String="[^$\*\?\\{}&separator;/]*" /> <!--consume everything until next special-->
-- </context>
--
-- <context name="PathBrace" attribute="Path" lineEndContext="#pop">
-- <LineContinue attribute="Escape" />
-- <DetectChar attribute="Keychar" context="#pop" char="}" />
-- <DetectChar attribute="Separator" char="," />
-- <AnyChar attribute="Error" String=" #&commandsep;<>^)" />
-- <AnyChar attribute="Glob" String="*?" />
-- <DetectChar attribute="Path" char="/" />
-- <DetectChar attribute="Keychar" context="PathBrace" char="{" />
-- <IncludeRules context="FindStrings" />
-- <IncludeRules context="FindVarExpansion" />
-- <IncludeRules context="FindSubstitutions" />
-- <IncludeRules context="FindEscapes" />
-- <RegExpr attribute="Path" String="[^$\*\?\\,{}&separator;/]*" />
-- </context>
--
-- <!-- FindEscapes contains various rules to mark different shell input -->
-- <context name="FindEscapes" attribute="Normal Text" lineEndContext="#stay">
-- <RegExpr attribute="Escape" String="\\(?:&escapechars;|[0-7]{1,3}|[xX][A-Fa-f0-9]{1,2}|u[A-Fa-f0-9]{1,4}|U[A-Fa-f0-9]{1,8}|c.)" />
-+ <context name="ArgPath" attribute="Path" lineEndContext="#pop#pop#pop">
-+ <IncludeRules context="PopWhenSep"/>
-+ <IncludeRules context="FindFishExprWithoutBrace"/>
-+ <IncludeRules context="FindPathBraceExpansion"/>
- </context>
-
-+ <context name="ArgumentsNone" attribute="Error" lineEndContext="#pop">
-+ <IncludeRules context="PopWhenSep"/>
-+ <DetectIdentifier attribute="Error" context="#pop!Arguments!FieldSep"/>
-+ <Int attribute="Error" context="#pop!Arguments!FieldSep"/>
-+ </context>
-+ <!--
-+ @} Arguments
-+ -->
-+
- </contexts>
-
- <itemDatas>
-- <itemData name="Normal Text" defStyleNum="dsNormal" />
-- <itemData name="Path" defStyleNum="dsNormal" />
-- <itemData name="Option" defStyleNum="dsNormal" />
-- <itemData name="Escape" defStyleNum="dsKeyword" />
-- <itemData name="Separator" defStyleNum="dsKeyword" />
-- <itemData name="Glob" defStyleNum="dsKeyword" />
-- <itemData name="HomeDir" defStyleNum="dsKeyword" />
-- <itemData name="Keychar" defStyleNum="dsSpecialChar" />
-- <itemData name="Command" defStyleNum="dsFunction" />
-- <itemData name="UnixCommand" defStyleNum="dsFunction" />
-- <itemData name="CommandPath" defStyleNum="dsExtension" />
-- <itemData name="Variable" defStyleNum="dsVariable" />
-- <itemData name="Control Flow" defStyleNum="dsControlFlow" />
-- <itemData name="Operator" defStyleNum="dsOperator" />
-- <itemData name="Redirection" defStyleNum="dsOperator" />
-- <itemData name="Builtin" defStyleNum="dsBuiltIn" />
-- <itemData name="Index" defStyleNum="dsAttribute" />
--
-- <itemData name="String SingleQ" defStyleNum="dsString" />
-- <itemData name="String DoubleQ" defStyleNum="dsString" />
-- <itemData name="Process" defStyleNum="dsImport" />
--
--
-- <itemData name="Comment" defStyleNum="dsComment" />
-- <itemData name="Function Doc" defStyleNum="dsDocumentation" />
--
-- <itemData name="Error" defStyleNum="dsError" />
-+ <itemData name="Normal Text" defStyleNum="dsNormal"/>
-+ <itemData name="Path" defStyleNum="dsNormal"/>
-+ <itemData name="Option" defStyleNum="dsNormal"/>
-+ <itemData name="Escape" defStyleNum="dsKeyword"/>
-+ <itemData name="Separator" defStyleNum="dsKeyword"/>
-+ <itemData name="Glob" defStyleNum="dsKeyword"/>
-+ <itemData name="HomeDir" defStyleNum="dsKeyword"/>
-+ <itemData name="Keychar" defStyleNum="dsSpecialChar"/>
-+ <itemData name="Command" defStyleNum="dsFunction"/>
-+ <itemData name="UnixCommand" defStyleNum="dsFunction"/>
-+ <itemData name="CommandPath" defStyleNum="dsExtension"/>
-+ <itemData name="Variable" defStyleNum="dsVariable"/>
-+ <itemData name="Keyword" defStyleNum="dsKeyword"/>
-+ <itemData name="Control Flow" defStyleNum="dsControlFlow"/>
-+ <itemData name="Operator" defStyleNum="dsOperator"/>
-+ <itemData name="Redirection" defStyleNum="dsOperator"/>
-+ <itemData name="Builtin" defStyleNum="dsBuiltIn"/>
-+ <itemData name="Index" defStyleNum="dsAttribute"/>
-+
-+ <itemData name="String SingleQ" defStyleNum="dsString"/>
-+ <itemData name="String DoubleQ" defStyleNum="dsString"/>
-+
-+ <itemData name="Comment" defStyleNum="dsComment"/>
-+ <itemData name="Function Doc" defStyleNum="dsDocumentation"/>
-+
-+ <itemData name="Error" defStyleNum="dsError"/>
- </itemDatas>
- </highlighting>
- <general>
-- <!-- no / as weakDeliminator, otherwwise in /usr/bin/ls ls is not recognized as UnixCommand -->
-- <keywords casesensitive="1" weakDeliminator="\+,-:=!.@#%^_`~" wordWrapDeliminator="&separator;"/>
-+ <keywords casesensitive="1" weakDeliminator="\+,-:=!.@#%^_`~/" wordWrapDeliminator="&separator;"/>
- <comments>
- <comment name="singleLine" start="#" position="afterwhitespace"/>
- </comments>
-diff --git a/data/syntax/latex.xml b/data/syntax/latex.xml
-index 7bf8220ae2021c46918286d03621393472d31b00..bc6cd193f573efe59c858e9cb61c64effb3ca3d6 100644
---- a/data/syntax/latex.xml
-+++ b/data/syntax/latex.xml
-@@ -4,7 +4,7 @@
- <!ENTITY bullet "×">
- <!ENTITY envname "[a-zA-Z]+\*?">
- ]>
--<language name="LaTeX" version="28" section="Markup" kateversion="6.22" priority="10" extensions="*.tex;*.ltx;*.dtx;*.sty;*.cls;*.bbx;*.cbx;*.lbx;*.tikz;*.pgf" mimetype="text/x-tex" casesensitive="1" author="Jeroen Wijnhout (Jeroen.Wijnhout at kdemail.net)+Holger Danielsson (holger.danielsson at versanet.de)+Michel Ludwig (michel.ludwig at kdemail.net)+Thomas Braun (thomas.braun at virtuell-zuhause.de)" license="LGPL" >
-+<language name="LaTeX" version="29" section="Markup" kateversion="6.22" priority="10" extensions="*.tex;*.ltx;*.dtx;*.sty;*.cls;*.bbx;*.cbx;*.lbx;*.tikz;*.pgf" mimetype="text/x-tex" casesensitive="1" author="Jeroen Wijnhout (Jeroen.Wijnhout at kdemail.net)+Holger Danielsson (holger.danielsson at versanet.de)+Michel Ludwig (michel.ludwig at kdemail.net)+Thomas Braun (thomas.braun at virtuell-zuhause.de)" license="LGPL" >
- <highlighting>
- <!-- NOTE: Keywords of kind "\something" do not need a delimiter before "\".
- Using a DetectChar rule with lookAhead to detect "\" at the beginning
-@@ -1937,7 +1937,7 @@
- <IncludeRules context="##Erlang" includeAttrib="true"/>
- </context>
-
-- <context name="HighlightingFish" attribute="Normal Text" lineEndContext="#stay">
-+ <context name="HighlightingFish" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="Arguments##Fish!FieldSep##Fish!CommandName##Fish">
- <IncludeRules context="FindHighlightingEnd"/>
- <IncludeRules context="##Fish" includeAttrib="true"/>
- </context>
\ No newline at end of file
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index 70dc605..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1 +0,0 @@
-a0c1838c393e3644b394b2883c32834f0a3bf2b5.diff
\ No newline at end of file
More information about the Neon-commits
mailing list