Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/treetrek.git
render/LanguageDefinitions.php
'string' => '/(\'.*?\')/',
'comment' => '/(#[^\n]*)/',
- 'keyword' => '/\b(alias|bg|bind|break|builtin|case|cd|command|compgen|complete|continue|declare|dirs|disown|do|done|echo|elif|else|enable|esac|eval|exec|exit|export|fc|fg|fi|for|function|getopts|hash|help|history|if|jobs|kill|let|local|logout|popd|printf|pushd|pwd|read|readonly|return|set|shift|shopt|source|suspend|test|then|times|trap|type|typeset|ulimit|umask|unalias|unset|until|wait|while)\b/',
+ 'keyword' => '/(?<!-)\b(alias|bg|bind|break|builtin|case|cd|command|compgen|complete|continue|declare|dirs|disown|do|done|echo|elif|else|enable|esac|eval|exec|exit|export|fc|fg|fi|for|function|getopts|hash|help|history|if|jobs|kill|let|local|logout|popd|printf|pushd|pwd|read|readonly|return|set|shift|shopt|source|suspend|test|then|times|trap|type|typeset|ulimit|umask|unalias|unset|until|wait|while)\b/',
'function' => '/\b([a-zA-Z_][a-zA-Z0-9_]*)\s*(?=\()/',
'variable' => '/(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{[^}]+\})/',

Negative lookahead for bash keywords

Author Dave Jarvis <email>
Date 2026-02-14 20:11:49 GMT-0800
Commit d08184c7b0aa7a15b8ada931547b4915fe1b8ad0
Parent 3cb21b3
Delta 1 line added, 1 line removed