|
316 | 316 | <array> |
317 | 317 | <dict> |
318 | 318 | <key>begin</key> |
319 | | - <string>\b(function)\s+([^\s\\]+)(?:\s*(\(\)))?</string> |
| 319 | + <string>(?<=^|;|&|\s)(function)\s+([^\s\\]+)(?:\s*(\(\)))?</string> |
320 | 320 | <key>beginCaptures</key> |
321 | 321 | <dict> |
322 | 322 | <key>1</key> |
|
357 | 357 | </dict> |
358 | 358 | <dict> |
359 | 359 | <key>begin</key> |
360 | | - <string>\b([^\s\\=]+)\s*(\(\))</string> |
| 360 | + <string>(?<=^|;|&|\s)([^\s\\=]+)\s*(\(\))</string> |
361 | 361 | <key>beginCaptures</key> |
362 | 362 | <dict> |
363 | 363 | <key>1</key> |
|
424 | 424 | <key>contentName</key> |
425 | 425 | <string>source.ruby.embedded.shell</string> |
426 | 426 | <key>end</key> |
427 | | - <string>^\t*(RUBY)\b</string> |
| 427 | + <string>^\t*(RUBY)(?=\s|;|&|$)</string> |
428 | 428 | <key>endCaptures</key> |
429 | 429 | <dict> |
430 | 430 | <key>1</key> |
|
470 | 470 | <key>contentName</key> |
471 | 471 | <string>source.ruby.embedded.shell</string> |
472 | 472 | <key>end</key> |
473 | | - <string>^(RUBY)\b</string> |
| 473 | + <string>^(RUBY)(?=\s|;|&|$)</string> |
474 | 474 | <key>endCaptures</key> |
475 | 475 | <dict> |
476 | 476 | <key>1</key> |
|
516 | 516 | <key>contentName</key> |
517 | 517 | <string>source.python.embedded.shell</string> |
518 | 518 | <key>end</key> |
519 | | - <string>^\t*(PYTHON)\b</string> |
| 519 | + <string>^\t*(PYTHON)(?=\s|;|&|$)</string> |
520 | 520 | <key>endCaptures</key> |
521 | 521 | <dict> |
522 | 522 | <key>1</key> |
|
562 | 562 | <key>contentName</key> |
563 | 563 | <string>source.python.embedded.shell</string> |
564 | 564 | <key>end</key> |
565 | | - <string>^(PYTHON)\b</string> |
| 565 | + <string>^(PYTHON)(?=\s|;|&|$)</string> |
566 | 566 | <key>endCaptures</key> |
567 | 567 | <dict> |
568 | 568 | <key>1</key> |
|
608 | 608 | <key>contentName</key> |
609 | 609 | <string>source.applescript.embedded.shell</string> |
610 | 610 | <key>end</key> |
611 | | - <string>^\t*(APPLESCRIPT)\b</string> |
| 611 | + <string>^\t*(APPLESCRIPT)(?=\s|;|&|$)</string> |
612 | 612 | <key>endCaptures</key> |
613 | 613 | <dict> |
614 | 614 | <key>1</key> |
|
654 | 654 | <key>contentName</key> |
655 | 655 | <string>source.applescript.embedded.shell</string> |
656 | 656 | <key>end</key> |
657 | | - <string>^(APPLESCRIPT)\b</string> |
| 657 | + <string>^(APPLESCRIPT)(?=\s|;|&|$)</string> |
658 | 658 | <key>endCaptures</key> |
659 | 659 | <dict> |
660 | 660 | <key>1</key> |
|
700 | 700 | <key>contentName</key> |
701 | 701 | <string>text.html.embedded.shell</string> |
702 | 702 | <key>end</key> |
703 | | - <string>^\t*(HTML)\b</string> |
| 703 | + <string>^\t*(HTML)(?=\s|;|&|$)</string> |
704 | 704 | <key>endCaptures</key> |
705 | 705 | <dict> |
706 | 706 | <key>1</key> |
|
746 | 746 | <key>contentName</key> |
747 | 747 | <string>text.html.embedded.shell</string> |
748 | 748 | <key>end</key> |
749 | | - <string>^(HTML)\b</string> |
| 749 | + <string>^(HTML)(?=\s|;|&|$)</string> |
750 | 750 | <key>endCaptures</key> |
751 | 751 | <dict> |
752 | 752 | <key>1</key> |
|
792 | 792 | <key>contentName</key> |
793 | 793 | <string>text.html.markdown.embedded.shell</string> |
794 | 794 | <key>end</key> |
795 | | - <string>^\t*(MARKDOWN)\b</string> |
| 795 | + <string>^\t*(MARKDOWN)(?=\s|;|&|$)</string> |
796 | 796 | <key>endCaptures</key> |
797 | 797 | <dict> |
798 | 798 | <key>1</key> |
|
838 | 838 | <key>contentName</key> |
839 | 839 | <string>text.html.markdown.embedded.shell</string> |
840 | 840 | <key>end</key> |
841 | | - <string>^(MARKDOWN)\b</string> |
| 841 | + <string>^(MARKDOWN)(?=\s|;|&|$)</string> |
842 | 842 | <key>endCaptures</key> |
843 | 843 | <dict> |
844 | 844 | <key>1</key> |
|
884 | 884 | <key>contentName</key> |
885 | 885 | <string>text.html.textile.embedded.shell</string> |
886 | 886 | <key>end</key> |
887 | | - <string>^\t*(TEXTILE)\b</string> |
| 887 | + <string>^\t*(TEXTILE)(?=\s|;|&|$)</string> |
888 | 888 | <key>endCaptures</key> |
889 | 889 | <dict> |
890 | 890 | <key>1</key> |
|
930 | 930 | <key>contentName</key> |
931 | 931 | <string>text.html.textile.embedded.shell</string> |
932 | 932 | <key>end</key> |
933 | | - <string>^(TEXTILE)\b</string> |
| 933 | + <string>^(TEXTILE)(?=\s|;|&|$)</string> |
934 | 934 | <key>endCaptures</key> |
935 | 935 | <dict> |
936 | 936 | <key>1</key> |
|
974 | 974 | </dict> |
975 | 975 | </dict> |
976 | 976 | <key>end</key> |
977 | | - <string>^\t*(\3)\b</string> |
| 977 | + <string>^\t*(\3)(?=\s|;|&|$)</string> |
978 | 978 | <key>endCaptures</key> |
979 | 979 | <dict> |
980 | 980 | <key>1</key> |
|
1011 | 1011 | </dict> |
1012 | 1012 | </dict> |
1013 | 1013 | <key>end</key> |
1014 | | - <string>^(\3)\b</string> |
| 1014 | + <string>^(\3)(?=\s|;|&|$)</string> |
1015 | 1015 | <key>endCaptures</key> |
1016 | 1016 | <dict> |
1017 | 1017 | <key>1</key> |
|
1219 | 1219 | <array> |
1220 | 1220 | <dict> |
1221 | 1221 | <key>match</key> |
1222 | | - <string>\b(?:if|then|else|elif|fi|for|in|do|done|select|case|continue|esac|while|until|return)\b</string> |
| 1222 | + <string>(?<=^|;|&|\s)(?:if|then|else|elif|fi|for|in|do|done|select|case|continue|esac|while|until|return)(?=\s|;|&|$)</string> |
1223 | 1223 | <key>name</key> |
1224 | 1224 | <string>keyword.control.shell</string> |
1225 | 1225 | </dict> |
1226 | 1226 | <dict> |
1227 | 1227 | <key>match</key> |
1228 | | - <string>(?<![-/])\b(?:export|declare|typeset|local|readonly)\b</string> |
| 1228 | + <string>(?<=^|;|&|\s)(?:export|declare|typeset|local|readonly)(?=\s|;|&|$)</string> |
1229 | 1229 | <key>name</key> |
1230 | 1230 | <string>storage.modifier.shell</string> |
1231 | 1231 | </dict> |
|
1269 | 1269 | <array> |
1270 | 1270 | <dict> |
1271 | 1271 | <key>begin</key> |
1272 | | - <string>\b(for)\s+(?=\({2})</string> |
| 1272 | + <string>(?<=^|;|&|\s)(for)\s+(?=\({2})</string> |
1273 | 1273 | <key>captures</key> |
1274 | 1274 | <dict> |
1275 | 1275 | <key>1</key> |
|
1279 | 1279 | </dict> |
1280 | 1280 | </dict> |
1281 | 1281 | <key>end</key> |
1282 | | - <string>\b(done)\b</string> |
| 1282 | + <string>(?<=^|;|&|\s)(done)(?=\s|;|&|$)</string> |
1283 | 1283 | <key>name</key> |
1284 | 1284 | <string>meta.scope.for-loop.shell</string> |
1285 | 1285 | <key>patterns</key> |
|
1292 | 1292 | </dict> |
1293 | 1293 | <dict> |
1294 | 1294 | <key>begin</key> |
1295 | | - <string>\b(for)\s+((?:[^\s\\]|\\.)+)\b</string> |
| 1295 | + <string>(?<=^|;|&|\s)(for)\s+((?:[^\s\\]|\\.)+)(?=\s|;|&|$)</string> |
1296 | 1296 | <key>beginCaptures</key> |
1297 | 1297 | <dict> |
1298 | 1298 | <key>1</key> |
|
1307 | 1307 | </dict> |
1308 | 1308 | </dict> |
1309 | 1309 | <key>end</key> |
1310 | | - <string>\b(done)\b</string> |
| 1310 | + <string>(?<=^|;|&|\s)(done)(?=\s|;|&|$)</string> |
1311 | 1311 | <key>endCaptures</key> |
1312 | 1312 | <dict> |
1313 | 1313 | <key>1</key> |
|
1328 | 1328 | </dict> |
1329 | 1329 | <dict> |
1330 | 1330 | <key>begin</key> |
1331 | | - <string>\b(while|until)\b</string> |
| 1331 | + <string>(?<=^|;|&|\s)(while|until)(?=\s|;|&|$)</string> |
1332 | 1332 | <key>captures</key> |
1333 | 1333 | <dict> |
1334 | 1334 | <key>1</key> |
|
1338 | 1338 | </dict> |
1339 | 1339 | </dict> |
1340 | 1340 | <key>end</key> |
1341 | | - <string>\b(done)\b</string> |
| 1341 | + <string>(?<=^|;|&|\s)(done)(?=\s|;|&|$)</string> |
1342 | 1342 | <key>name</key> |
1343 | 1343 | <string>meta.scope.while-loop.shell</string> |
1344 | 1344 | <key>patterns</key> |
|
1351 | 1351 | </dict> |
1352 | 1352 | <dict> |
1353 | 1353 | <key>begin</key> |
1354 | | - <string>\b(select)\s+((?:[^\s\\]|\\.)+)\b</string> |
| 1354 | + <string>(?<=^|;|&|\s)(select)\s+((?:[^\s\\]|\\.)+)(?=\s|;|&|$)</string> |
1355 | 1355 | <key>beginCaptures</key> |
1356 | 1356 | <dict> |
1357 | 1357 | <key>1</key> |
|
1366 | 1366 | </dict> |
1367 | 1367 | </dict> |
1368 | 1368 | <key>end</key> |
1369 | | - <string>\b(done)\b</string> |
| 1369 | + <string>(?<=^|;|&|\s)(done)(?=\s|;|&|$)</string> |
1370 | 1370 | <key>endCaptures</key> |
1371 | 1371 | <dict> |
1372 | 1372 | <key>1</key> |
|
1387 | 1387 | </dict> |
1388 | 1388 | <dict> |
1389 | 1389 | <key>begin</key> |
1390 | | - <string>\b(case)\b</string> |
| 1390 | + <string>(?<=^|;|&|\s)(case)(?=\s|;|&|$)</string> |
1391 | 1391 | <key>captures</key> |
1392 | 1392 | <dict> |
1393 | 1393 | <key>1</key> |
|
1397 | 1397 | </dict> |
1398 | 1398 | </dict> |
1399 | 1399 | <key>end</key> |
1400 | | - <string>\b(esac)\b</string> |
| 1400 | + <string>(?<=^|;|&|\s)(esac)(?=\s|;|&|$)</string> |
1401 | 1401 | <key>name</key> |
1402 | 1402 | <string>meta.scope.case-block.shell</string> |
1403 | 1403 | <key>patterns</key> |
1404 | 1404 | <array> |
1405 | 1405 | <dict> |
1406 | 1406 | <key>begin</key> |
1407 | | - <string>\b(?:in)\b</string> |
| 1407 | + <string>(?<=^|;|&|\s)(?:in)(?=\s|;|&|$)</string> |
1408 | 1408 | <key>beginCaptures</key> |
1409 | 1409 | <dict> |
1410 | 1410 | <key>1</key> |
|
1414 | 1414 | </dict> |
1415 | 1415 | </dict> |
1416 | 1416 | <key>end</key> |
1417 | | - <string>(?=\b(?:esac)\b)</string> |
| 1417 | + <string>(?<=^|;|&|\s)(?=(?:esac)(?:\s|;|&|$))</string> |
1418 | 1418 | <key>name</key> |
1419 | 1419 | <string>meta.scope.case-body.shell</string> |
1420 | 1420 | <key>patterns</key> |
|
1441 | 1441 | </dict> |
1442 | 1442 | <dict> |
1443 | 1443 | <key>begin</key> |
1444 | | - <string>(^|(?<=[&;|]))\s*(if)\b</string> |
| 1444 | + <string>(^|(?<=[&;|]))\s*(if)(?=\s|;|&|$)</string> |
1445 | 1445 | <key>beginCaptures</key> |
1446 | 1446 | <dict> |
1447 | 1447 | <key>2</key> |
|
1453 | 1453 | <key>comment</key> |
1454 | 1454 | <string>Restrict match to avoid matching in lines like `dd if=/dev/sda1 …`</string> |
1455 | 1455 | <key>end</key> |
1456 | | - <string>\b(fi)\b</string> |
| 1456 | + <string>(?<=^|;|&|\s)(fi)(?=\s|;|&|$)</string> |
1457 | 1457 | <key>endCaptures</key> |
1458 | 1458 | <dict> |
1459 | 1459 | <key>1</key> |
|
1574 | 1574 | <array> |
1575 | 1575 | <dict> |
1576 | 1576 | <key>match</key> |
1577 | | - <string>\b(time)\b</string> |
| 1577 | + <string>(?<=^|;|&|\s)(time)(?=\s|;|&|$)</string> |
1578 | 1578 | <key>name</key> |
1579 | 1579 | <string>keyword.other.shell</string> |
1580 | 1580 | </dict> |
|
1765 | 1765 | <array> |
1766 | 1766 | <dict> |
1767 | 1767 | <key>match</key> |
1768 | | - <string>(?<=^|\s)(?::|\.)(?=\s|;|&|$)</string> |
| 1768 | + <string>(?<=^|;|&|\s)(?::|\.)(?=\s|;|&|$)</string> |
1769 | 1769 | <key>name</key> |
1770 | 1770 | <string>support.function.builtin.shell</string> |
1771 | 1771 | </dict> |
1772 | 1772 | <dict> |
1773 | 1773 | <key>match</key> |
1774 | | - <string>(?<![-/])\b(?:alias|bg|bind|break|builtin|caller|cd|command|compgen|complete|dirs|disown|echo|enable|eval|exec|exit|false|fc|fg|getopts|hash|help|history|jobs|kill|let|logout|popd|printf|pushd|pwd|read|readonly|set|shift|shopt|source|suspend|test|times|trap|true|type|ulimit|umask|unalias|unset|wait)\b</string> |
| 1774 | + <string>(?<=^|;|&|\s)(?:alias|bg|bind|break|builtin|caller|cd|command|compgen|complete|dirs|disown|echo|enable|eval|exec|exit|false|fc|fg|getopts|hash|help|history|jobs|kill|let|logout|popd|printf|pushd|pwd|read|readonly|set|shift|shopt|source|suspend|test|times|trap|true|type|ulimit|umask|unalias|unset|wait)(?=\s|;|&|$)</string> |
1775 | 1775 | <key>name</key> |
1776 | 1776 | <string>support.function.builtin.shell</string> |
1777 | 1777 | </dict> |
|
0 commit comments