mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-11-27 15:01:22 +08:00
27 lines
610 B
Plaintext
27 lines
610 B
Plaintext
# A sample file to test syntax highlighting.
|
|
|
|
nop "double \n quoted" and 'single '' quoted' # comment
|
|
|
|
# Various variable contexts
|
|
nop $pid
|
|
var var-name = { var fn-name~ = {var not-var-name} }
|
|
nop (set var-name = foo | tmp var-name = bar); del var-name
|
|
for var-name [] { }
|
|
try { } catch var-name { }
|
|
|
|
# Builtin functions
|
|
!= a (nop b) | echo c
|
|
|
|
# Builtin special command
|
|
and a b # "operator"
|
|
use re # "other"
|
|
if a { } elif b { } else { }
|
|
try { } except err { } else { } finally { }
|
|
|
|
# Metacharacters
|
|
echo ** () []
|
|
|
|
# Regression tests
|
|
set-env # should highlight entire set-env
|
|
set-foo # should highlight nothing
|