notepad-plus-plus/lexilla/test/examples/bash/hash.zsh.styled

52 lines
1.6 KiB
Plaintext
Raw Normal View History

Update Scintilla to v5.3.7 & Lexilla to v5.2.7 Update scintilla with https://www.scintilla.org/scintilla537.zip Release 5.3.7 Released 22 September 2023. For GTK on macOS, fix popup window behaviour by setting type hints. Bug #2401. For GTK, fix assertion failure on some systems when an INDIC_SQUIGGLEPIXMAP drawn for a zero-width character. For Qt, allow parent window to handle context menu events by setting as ignored. Bug #2395. For Qt, fix potential crash when using IME with large amount of text selected. For Windows, fix building with non-English environment. Bug #2400. and lexilla https://www.scintilla.org/lexilla527.zip Release 5.2.7 Released 22 September 2023. Fix building on Windows with non-English environment. Pull request #200. Bash: fix line continuation for comments and when multiple backslashes at line end. Issue #195. Bash: treat += as operator and, inside arithmetic expressions, treat ++ and -- as operators. Issue #197. Bash: improve backslash handling inside backquoted command substitution and fix $ at end of backtick expression. Issue #194. Bash: treat words that are similar to numbers but invalid wholly as identifiers. Issue #199. Bash: consistently handle '-' options at line start and after '|' as identifiers. Issue #202. Bash: handle '-' options differently in [ single ] and [[ double ]] bracket constructs. Issue #203. F#: improve speed of folding long lines. Issue #198. HTML: fix invalid entity at line end and terminate invalid entity before invalid character. Issue #192. Fix #13991, fix #14062, close #14173
2023-09-22 09:32:35 +00:00
{2}#!/bin/zsh{0}
{2}# Tests for zsh extensions{0}
{2}# Can be executed by zsh with reasonable results{0}
{2}# Some of these were implemented by commit [87286d] for Scintilla bug #1794{0}
{2}# https://zsh.sourceforge.io/Doc/Release/Expansion.html{0}
{2}# Where # does not start a comment{0}
{2}## Formatting base{0}
{4}print{0} {7}$(({0} {7}[{8}#8{7}]{0} {8}y{0} {7}={0} {3}33{0} {7})){0}
{4}print{0} {7}$(({0} {7}[{8}##8{7}]{0} {3}32767{0} {7})){0}
{2}# Formatting base and grouping{0}
{4}print{0} {7}$(({0} {7}[{8}#16_4{7}]{0} {3}65536{0} {7}**{0} {3}2{0} {7})){0}
{2}## Character values{0}
{4}print{0} {7}$(({0} {8}##T{7}+{3}0{0} {7})){0}
{4}print{0} {7}$(({0} {8}##^G{7}+{3}0{0} {7})){0}
{2}# Failure: does not work when - included for bindkey syntax. \M-\C-x means Meta+Ctrl+x.{0}
{4}print{0} {7}$(({0} {8}##\M{7}-{8}\C{7}-{8}x{7}+{3}0{0} {7})){0}
{2}# Value of first character of variable in expression{0}
{8}var{7}={8}Tree{0}
{4}print{0} {7}$(({0} {8}#var{7}+{3}0{0} {7})){0}
{2}## Extended glob{0}
{4}setopt{0} {8}extended_glob{0}
{2}# # is similar to *, ## similar to +{0}
{4}echo{0} {7}[{8}A-Za-z{7}]{8}#.bsh{0}
{4}echo{0} {7}[{8}A-Za-z{7}]{8}##.bsh{0}
{2}# 13 character file names{0}
{4}echo{0} {7}**/[{8}a-zA-Z.{7}]{8}(#c13){0}
{2}# 13-15 character file names{0}
{4}echo{0} {7}**/[{8}a-zA-Z.{7}]{8}(#c13,15){0}
{2}## Glob flag{0}
{2}# i=case-insensitive{0}
{4}echo{0} {8}(#i)a{7}*{0}
{2}# b=back-references{0}
{8}foo{7}={5}"a_string_with_a_message"{0}
{4}if{0} {7}[[{0} {9}$foo{0} {7}={0} {7}({8}a{7}|{8}an{7}){8}_(#b){7}(*){0} {7}]];{0} {4}then{0}
{4}print{0} {10}${foo[$mbegin[1],$mend[1]]}{0}
{4}fi{0}