]> git.lizzy.rs Git - micro.git/blob - runtime/syntax/fish.micro
Merge branch 'duplicate' of https://github.com/onodera-punpun/micro into onodera...
[micro.git] / runtime / syntax / fish.micro
1 ## Here is an example for Fish shell scripts.
2 ##
3 syntax "fish" "\.fish$"
4 header "^#!.*/(env +)?fish( |$)"
5
6 ## Numbers
7 color brightcyan "\b[0-9]+\b"
8
9 ## Conditionals and control flow
10 color brightyellow "\b(and|begin|break|case|continue|else|end|for|function|if|not|or|return|select|shift|switch|while)\b"
11 color brightmagenta "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|^|!|=|&|\|)"
12
13 ## Fish commands
14 color green "\b(bg|bind|block|breakpoint|builtin|cd|count|command|commandline|complete|dirh|dirs|echo|emit|eval|exec|exit|fg|fish|fish_config|fish_ident|fish_pager|fish_prompt|fish_right_prompt|fish_update_completions|fishd|funced|funcsave|functions|help|history|jobs|math|mimedb|nextd|open|popd|prevd|psub|pushd|pwd|random|read|set|set_color|status|string|trap|type|ulimit|umask|vared)\b"
15
16 ## Common linux commands
17 color green "\b((g|ig)?awk|bash|dash|find|\w{0,4}grep|kill|killall|\w{0,4}less|make|pkill|sed|sh|tar)\b"
18
19 ## Coreutils commands
20 color green "\b(base64|basename|cat|chcon|chgrp|chmod|chown|chroot|cksum|comm|cp|csplit|cut|date|dd|df|dir|dircolors|dirname|du|env|expand|expr|factor|false|fmt|fold|head|hostid|id|install|join|link|ln|logname|ls|md5sum|mkdir|mkfifo|mknod|mktemp|mv|nice|nl|nohup|nproc|numfmt|od|paste|pathchk|pinky|pr|printenv|printf|ptx|pwd|readlink|realpath|rm|rmdir|runcon|seq|(sha1|sha224|sha256|sha384|sha512)sum|shred|shuf|sleep|sort|split|stat|stdbuf|stty|sum|sync|tac|tail|tee|test|time|timeout|touch|tr|true|truncate|tsort|tty|uname|unexpand|uniq|unlink|users|vdir|wc|who|whoami|yes)\b"
21
22 ## Conditional flags
23 color brightyellow "--[a-z-]+"
24 color brightyellow "\ -[a-z]+"
25
26 ## Strings
27 color brightcyan ""(\\.|[^"])*""
28 color brightcyan "'(\\.|[^'])*'"
29 color brightmagenta """
30 color brightmagenta "'"
31
32 ## Variables
33 color brightmagenta (i) "\$\{?[0-9A-Z_!@#$*?-]+\}?"
34
35 ## Comments
36 color brightblack "(^|[[:space:]])#.*$"