-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfish.nanorc
41 lines (29 loc) · 2.03 KB
/
fish.nanorc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Syntax highlighting for fish scripts.
syntax fish "\.fish$"
header "^#!.*/(env +)?fish( |$)"
comment "# "
tabgives " "
# Commands.
color magenta "\<(_|abbr|alias|and|argparse|begin|bg|bind|block|break|breakpoint|builtin|case|cd|cdh|command|commandline|complete|contains|continue|count|dirh|dirs|disown|echo|else|emit|end|eval|exec|exit|false|fg|fish|fish_add_path|fish_breakpoint_prompt|fish_clipboard_copy|fish_clipboard_paste|fish_command_not_found|fish_config|fish_default_key_bindings|fish_delta|fish_git_prompt|fish_greeting|fish_hg_prompt|fish_indent|fish_is_root_user|fish_key_reader|fish_mode_prompt|fish_opt|fish_prompt|fish_right_prompt|fish_status_to_signal|fish_svn_prompt|fish_title|fish_update_completions|fish_vcs_prompt|fish_vi_key_bindings|for|funced|funcsave|function|functions|help|history|if|isatty|jobs|math|nextd|not|open|or|path|popd|prevd|printf|prompt_hostname|prompt_login|prompt_pwd|psub|pushd|pwd|random|read|realpath|return|set|set_color|source|status|string|string collect|string escape|string join|string join0|string length|string lower|string match|string pad|string repeat|string replace|string shorten|string split|string split0|string sub|string trim|string unescape|string upper|suspend|switch|test|time|trap|true|type|ulimit|umask|vared|wait|while)\>"
color normal "\.fish"
# Keywords.
color blue "\<(if|else|end|for|in|while|break|continue|function|return|begin|and|or|not|switch|case|command|builtin|time|exec)\>"
color blue "(&&|\|\|)"
# Parameter expansion.
color blue "[]*?(){,}[~]"
color blue "\$\("
# Variable expansion.
icolor yellow "\$[0-9a-z_]+"
icolor yellow "\{\$[0-9a-z_]+\}"
# Strings.
color green ""([^"\]|\\.)*""
color green "'([^'\]|\\.)*'"
# Multiline strings.
color green start="^ *(set( +--?[ULa-z]+)* +[0-9A-Za-z_]+|echo( +-[nsEe]+)*) +"" end="(^|[^"\]|\\.)""
color normal "^ *(set( +--?[ULa-z]+)* +[0-9A-Za-z_]+|echo( +-[nsEe]+)*) +"
color magenta "\<(set|echo)\>"
# Comments.
color red "^ *#.*$"
color red "[ ]#("([^"\]|\\.)*"|'([^'\]|\\.)*'|[^"'])*$"
# Trailing whitespaces.
color ,green " +$"