Mercurial > vim
annotate runtime/syntax/zsh.vim @ 18461:7f16792d15f7 v8.1.2224
patch 8.1.2224: cannot build Amiga version
Commit: https://github.com/vim/vim/commit/dfded98f87601b11271ee88392c821ceb6390eda
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Oct 26 21:33:19 2019 +0200
patch 8.1.2224: cannot build Amiga version
Problem: Cannot build Amiga version.
Solution: Add dummy mch_setmouse(). (Ola S?der, closes https://github.com/vim/vim/issues/5126)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 26 Oct 2019 21:45:03 +0200 |
parents | 6d11fc4aa683 |
children | 847a300aa244 |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
6823 | 2 " Language: Zsh shell script |
3 " Maintainer: Christian Brabandt <cb@256bit.org> | |
4 " Previous Maintainer: Nikolai Weibull <now@bitwi.se> | |
18456 | 5 " Latest Revision: 2018-07-13 |
6823 | 6 " License: Vim (see :h license) |
11400 | 7 " Repository: https://github.com/chrisbra/vim-zsh |
7 | 8 |
1125 | 9 if exists("b:current_syntax") |
7 | 10 finish |
11 endif | |
12 | |
1125 | 13 let s:cpo_save = &cpo |
14 set cpo&vim | |
15 | |
8246
f16bfe02cef1
commit https://github.com/vim/vim/commit/f391327adbbffb11180cf6038a92af1ed144e907
Christian Brabandt <cb@256bit.org>
parents:
7924
diff
changeset
|
16 if v:version > 704 || (v:version == 704 && has("patch1142")) |
f16bfe02cef1
commit https://github.com/vim/vim/commit/f391327adbbffb11180cf6038a92af1ed144e907
Christian Brabandt <cb@256bit.org>
parents:
7924
diff
changeset
|
17 syn iskeyword @,48-57,_,192-255,#,- |
f16bfe02cef1
commit https://github.com/vim/vim/commit/f391327adbbffb11180cf6038a92af1ed144e907
Christian Brabandt <cb@256bit.org>
parents:
7924
diff
changeset
|
18 else |
f16bfe02cef1
commit https://github.com/vim/vim/commit/f391327adbbffb11180cf6038a92af1ed144e907
Christian Brabandt <cb@256bit.org>
parents:
7924
diff
changeset
|
19 setlocal iskeyword+=- |
f16bfe02cef1
commit https://github.com/vim/vim/commit/f391327adbbffb11180cf6038a92af1ed144e907
Christian Brabandt <cb@256bit.org>
parents:
7924
diff
changeset
|
20 endif |
f16bfe02cef1
commit https://github.com/vim/vim/commit/f391327adbbffb11180cf6038a92af1ed144e907
Christian Brabandt <cb@256bit.org>
parents:
7924
diff
changeset
|
21 if get(g:, 'zsh_fold_enable', 0) |
f16bfe02cef1
commit https://github.com/vim/vim/commit/f391327adbbffb11180cf6038a92af1ed144e907
Christian Brabandt <cb@256bit.org>
parents:
7924
diff
changeset
|
22 setlocal foldmethod=syntax |
f16bfe02cef1
commit https://github.com/vim/vim/commit/f391327adbbffb11180cf6038a92af1ed144e907
Christian Brabandt <cb@256bit.org>
parents:
7924
diff
changeset
|
23 endif |
1125 | 24 |
25 syn keyword zshTodo contained TODO FIXME XXX NOTE | |
26 | |
11400 | 27 syn region zshComment oneline start='\%(^\|\s\+\)#' end='$' |
8246
f16bfe02cef1
commit https://github.com/vim/vim/commit/f391327adbbffb11180cf6038a92af1ed144e907
Christian Brabandt <cb@256bit.org>
parents:
7924
diff
changeset
|
28 \ contains=zshTodo,@Spell fold |
f16bfe02cef1
commit https://github.com/vim/vim/commit/f391327adbbffb11180cf6038a92af1ed144e907
Christian Brabandt <cb@256bit.org>
parents:
7924
diff
changeset
|
29 |
f16bfe02cef1
commit https://github.com/vim/vim/commit/f391327adbbffb11180cf6038a92af1ed144e907
Christian Brabandt <cb@256bit.org>
parents:
7924
diff
changeset
|
30 syn region zshComment start='^\s*#' end='^\%(\s*#\)\@!' |
f16bfe02cef1
commit https://github.com/vim/vim/commit/f391327adbbffb11180cf6038a92af1ed144e907
Christian Brabandt <cb@256bit.org>
parents:
7924
diff
changeset
|
31 \ contains=zshTodo,@Spell fold |
1125 | 32 |
33 syn match zshPreProc '^\%1l#\%(!\|compdef\|autoload\).*$' | |
34 | |
35 syn match zshQuoted '\\.' | |
36 syn region zshString matchgroup=zshStringDelimiter start=+"+ end=+"+ | |
8246
f16bfe02cef1
commit https://github.com/vim/vim/commit/f391327adbbffb11180cf6038a92af1ed144e907
Christian Brabandt <cb@256bit.org>
parents:
7924
diff
changeset
|
37 \ contains=zshQuoted,@zshDerefs,@zshSubst fold |
f16bfe02cef1
commit https://github.com/vim/vim/commit/f391327adbbffb11180cf6038a92af1ed144e907
Christian Brabandt <cb@256bit.org>
parents:
7924
diff
changeset
|
38 syn region zshString matchgroup=zshStringDelimiter start=+'+ end=+'+ fold |
1125 | 39 " XXX: This should probably be more precise, but Zsh seems a bit confused about it itself |
40 syn region zshPOSIXString matchgroup=zshStringDelimiter start=+\$'+ | |
41 \ end=+'+ contains=zshQuoted | |
42 syn match zshJobSpec '%\(\d\+\|?\=\w\+\|[%+-]\)' | |
43 | |
44 syn keyword zshPrecommand noglob nocorrect exec command builtin - time | |
45 | |
6823 | 46 syn keyword zshDelimiter do done end |
1125 | 47 |
48 syn keyword zshConditional if then elif else fi case in esac select | |
49 | |
1698 | 50 syn keyword zshRepeat while until repeat |
51 | |
52 syn keyword zshRepeat for foreach nextgroup=zshVariable skipwhite | |
1125 | 53 |
54 syn keyword zshException always | |
55 | |
56 syn keyword zshKeyword function nextgroup=zshKSHFunction skipwhite | |
57 | |
8246
f16bfe02cef1
commit https://github.com/vim/vim/commit/f391327adbbffb11180cf6038a92af1ed144e907
Christian Brabandt <cb@256bit.org>
parents:
7924
diff
changeset
|
58 syn match zshKSHFunction contained '\w\S\+' |
1125 | 59 syn match zshFunction '^\s*\k\+\ze\s*()' |
60 | |
61 syn match zshOperator '||\|&&\|;\|&!\=' | |
7 | 62 |
1125 | 63 syn match zshRedir '\d\=\(<\|<>\|<<<\|<&\s*[0-9p-]\=\)' |
64 syn match zshRedir '\d\=\(>\|>>\|>&\s*[0-9p-]\=\|&>\|>>&\|&>>\)[|!]\=' | |
65 syn match zshRedir '|&\=' | |
66 | |
1698 | 67 syn region zshHereDoc matchgroup=zshRedir |
68 \ start='<\@<!<<\s*\z([^<]\S*\)' | |
69 \ end='^\z1\>' | |
13912 | 70 \ contains=@zshSubst,@zshDerefs,zshQuoted,zshPOSIXString |
1698 | 71 syn region zshHereDoc matchgroup=zshRedir |
72 \ start='<\@<!<<\s*\\\z(\S\+\)' | |
73 \ end='^\z1\>' | |
13912 | 74 \ contains=@zshSubst,@zshDerefs,zshQuoted,zshPOSIXString |
1125 | 75 syn region zshHereDoc matchgroup=zshRedir |
1698 | 76 \ start='<\@<!<<-\s*\\\=\z(\S\+\)' |
77 \ end='^\s*\z1\>' | |
13912 | 78 \ contains=@zshSubst,@zshDerefs,zshQuoted,zshPOSIXString |
1125 | 79 syn region zshHereDoc matchgroup=zshRedir |
6823 | 80 \ start=+<\@<!<<\s*\(["']\)\z(\S\+\)\1+ |
1698 | 81 \ end='^\z1\>' |
82 syn region zshHereDoc matchgroup=zshRedir | |
83 \ start=+<\@<!<<-\s*\(["']\)\z(\S\+\)\1+ | |
1125 | 84 \ end='^\s*\z1\>' |
85 | |
1698 | 86 syn match zshVariable '\<\h\w*' contained |
87 | |
88 syn match zshVariableDef '\<\h\w*\ze+\==' | |
1125 | 89 " XXX: how safe is this? |
1698 | 90 syn region zshVariableDef oneline |
11400 | 91 \ start='\$\@<!\<\h\w*\[' end='\]\ze+\?=\?' |
1125 | 92 \ contains=@zshSubst |
93 | |
11400 | 94 syn cluster zshDerefs contains=zshShortDeref,zshLongDeref,zshDeref,zshDollarVar |
7 | 95 |
11400 | 96 syn match zshShortDeref '\$[!#$*@?_-]\w\@!' |
97 syn match zshShortDeref '\$[=^~]*[#+]*\d\+\>' | |
1125 | 98 |
11400 | 99 syn match zshLongDeref '\$\%(ARGC\|argv\|status\|pipestatus\|CPUTYPE\|EGID\|EUID\|ERRNO\|GID\|HOST\|LINENO\|LOGNAME\)' |
100 syn match zshLongDeref '\$\%(MACHTYPE\|OLDPWD OPTARG\|OPTIND\|OSTYPE\|PPID\|PWD\|RANDOM\|SECONDS\|SHLVL\|signals\)' | |
101 syn match zshLongDeref '\$\%(TRY_BLOCK_ERROR\|TTY\|TTYIDLE\|UID\|USERNAME\|VENDOR\|ZSH_NAME\|ZSH_VERSION\|REPLY\|reply\|TERM\)' | |
7 | 102 |
11400 | 103 syn match zshDollarVar '\$\h\w*' |
104 syn match zshDeref '\$[=^~]*[#+]*\h\w*\>' | |
7 | 105 |
1125 | 106 syn match zshCommands '\%(^\|\s\)[.:]\ze\s' |
107 syn keyword zshCommands alias autoload bg bindkey break bye cap cd | |
108 \ chdir clone comparguments compcall compctl | |
109 \ compdescribe compfiles compgroups compquote | |
110 \ comptags comptry compvalues continue dirs | |
111 \ disable disown echo echotc echoti emulate | |
112 \ enable eval exec exit export false fc fg | |
113 \ functions getcap getln getopts hash history | |
114 \ jobs kill let limit log logout popd print | |
18456 | 115 \ printf pushd pushln pwd r read |
11400 | 116 \ rehash return sched set setcap shift |
1125 | 117 \ source stat suspend test times trap true |
118 \ ttyctl type ulimit umask unalias unfunction | |
11400 | 119 \ unhash unlimit unset vared wait |
1125 | 120 \ whence where which zcompile zformat zftp zle |
13912 | 121 \ zmodload zparseopts zprof zpty zrecompile |
122 \ zregexparse zsocket zstyle ztcp | |
1125 | 123 |
6823 | 124 " Options, generated by: echo ${(j:\n:)options[(I)*]} | sort |
7477
05cf4cc72a9f
commit https://github.com/vim/vim/commit/fa7353428f705f7a13465a1943dddeede4083023
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
125 " Create a list of option names from zsh source dir: |
05cf4cc72a9f
commit https://github.com/vim/vim/commit/fa7353428f705f7a13465a1943dddeede4083023
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
126 " #!/bin/zsh |
05cf4cc72a9f
commit https://github.com/vim/vim/commit/fa7353428f705f7a13465a1943dddeede4083023
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
127 " topdir=/path/to/zsh-xxx |
18456 | 128 " grep '^pindex([A-Za-z_]*)$' $topdir/Doc/Zsh/options.yo | |
7477
05cf4cc72a9f
commit https://github.com/vim/vim/commit/fa7353428f705f7a13465a1943dddeede4083023
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
129 " while read opt |
05cf4cc72a9f
commit https://github.com/vim/vim/commit/fa7353428f705f7a13465a1943dddeede4083023
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
130 " do |
05cf4cc72a9f
commit https://github.com/vim/vim/commit/fa7353428f705f7a13465a1943dddeede4083023
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
131 " echo ${${(L)opt#pindex\(}%\)} |
05cf4cc72a9f
commit https://github.com/vim/vim/commit/fa7353428f705f7a13465a1943dddeede4083023
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
132 " done |
05cf4cc72a9f
commit https://github.com/vim/vim/commit/fa7353428f705f7a13465a1943dddeede4083023
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
133 |
6823 | 134 syn case ignore |
135 | |
11400 | 136 syn match zshOptStart /^\s*\%(\%(\%(un\)\?setopt\)\|set\s+[-+]o\)/ nextgroup=zshOption skipwhite |
11914 | 137 syn match zshOption / |
138 \ \%(\%(\<no_\?\)\?aliases\>\)\| | |
18456 | 139 \ \%(\%(\<no_\?\)\?aliasfuncdef\>\)\|\%(\%(no_\?\)\?alias_func_def\>\)\| |
11914 | 140 \ \%(\%(\<no_\?\)\?allexport\>\)\|\%(\%(no_\?\)\?all_export\>\)\| |
141 \ \%(\%(\<no_\?\)\?alwayslastprompt\>\)\|\%(\%(no_\?\)\?always_last_prompt\>\)\|\%(\%(no_\?\)\?always_lastprompt\>\)\| | |
142 \ \%(\%(\<no_\?\)\?alwaystoend\>\)\|\%(\%(no_\?\)\?always_to_end\>\)\| | |
143 \ \%(\%(\<no_\?\)\?appendcreate\>\)\|\%(\%(no_\?\)\?append_create\>\)\| | |
144 \ \%(\%(\<no_\?\)\?appendhistory\>\)\|\%(\%(no_\?\)\?append_history\>\)\| | |
145 \ \%(\%(\<no_\?\)\?autocd\>\)\|\%(\%(no_\?\)\?auto_cd\>\)\| | |
146 \ \%(\%(\<no_\?\)\?autocontinue\>\)\|\%(\%(no_\?\)\?auto_continue\>\)\| | |
147 \ \%(\%(\<no_\?\)\?autolist\>\)\|\%(\%(no_\?\)\?auto_list\>\)\| | |
148 \ \%(\%(\<no_\?\)\?automenu\>\)\|\%(\%(no_\?\)\?auto_menu\>\)\| | |
149 \ \%(\%(\<no_\?\)\?autonamedirs\>\)\|\%(\%(no_\?\)\?auto_name_dirs\>\)\| | |
150 \ \%(\%(\<no_\?\)\?autoparamkeys\>\)\|\%(\%(no_\?\)\?auto_param_keys\>\)\| | |
151 \ \%(\%(\<no_\?\)\?autoparamslash\>\)\|\%(\%(no_\?\)\?auto_param_slash\>\)\| | |
152 \ \%(\%(\<no_\?\)\?autopushd\>\)\|\%(\%(no_\?\)\?auto_pushd\>\)\| | |
153 \ \%(\%(\<no_\?\)\?autoremoveslash\>\)\|\%(\%(no_\?\)\?auto_remove_slash\>\)\| | |
154 \ \%(\%(\<no_\?\)\?autoresume\>\)\|\%(\%(no_\?\)\?auto_resume\>\)\| | |
155 \ \%(\%(\<no_\?\)\?badpattern\>\)\|\%(\%(no_\?\)\?bad_pattern\>\)\| | |
156 \ \%(\%(\<no_\?\)\?banghist\>\)\|\%(\%(no_\?\)\?bang_hist\>\)\| | |
157 \ \%(\%(\<no_\?\)\?bareglobqual\>\)\|\%(\%(no_\?\)\?bare_glob_qual\>\)\| | |
158 \ \%(\%(\<no_\?\)\?bashautolist\>\)\|\%(\%(no_\?\)\?bash_auto_list\>\)\| | |
159 \ \%(\%(\<no_\?\)\?bashrematch\>\)\|\%(\%(no_\?\)\?bash_rematch\>\)\| | |
160 \ \%(\%(\<no_\?\)\?beep\>\)\| | |
161 \ \%(\%(\<no_\?\)\?bgnice\>\)\|\%(\%(no_\?\)\?bg_nice\>\)\| | |
162 \ \%(\%(\<no_\?\)\?braceccl\>\)\|\%(\%(no_\?\)\?brace_ccl\>\)\| | |
163 \ \%(\%(\<no_\?\)\?braceexpand\>\)\|\%(\%(no_\?\)\?brace_expand\>\)\| | |
164 \ \%(\%(\<no_\?\)\?bsdecho\>\)\|\%(\%(no_\?\)\?bsd_echo\>\)\| | |
165 \ \%(\%(\<no_\?\)\?caseglob\>\)\|\%(\%(no_\?\)\?case_glob\>\)\| | |
166 \ \%(\%(\<no_\?\)\?casematch\>\)\|\%(\%(no_\?\)\?case_match\>\)\| | |
167 \ \%(\%(\<no_\?\)\?cbases\>\)\|\%(\%(no_\?\)\?c_bases\>\)\| | |
168 \ \%(\%(\<no_\?\)\?cdablevars\>\)\|\%(\%(no_\?\)\?cdable_vars\>\)\|\%(\%(no_\?\)\?cd_able_vars\>\)\| | |
169 \ \%(\%(\<no_\?\)\?chasedots\>\)\|\%(\%(no_\?\)\?chase_dots\>\)\| | |
170 \ \%(\%(\<no_\?\)\?chaselinks\>\)\|\%(\%(no_\?\)\?chase_links\>\)\| | |
171 \ \%(\%(\<no_\?\)\?checkjobs\>\)\|\%(\%(no_\?\)\?check_jobs\>\)\| | |
18456 | 172 \ \%(\%(\<no_\?\)\?checkrunningjobs\>\)\|\%(\%(no_\?\)\?check_running_jobs\>\)\| |
11914 | 173 \ \%(\%(\<no_\?\)\?clobber\>\)\| |
174 \ \%(\%(\<no_\?\)\?combiningchars\>\)\|\%(\%(no_\?\)\?combining_chars\>\)\| | |
175 \ \%(\%(\<no_\?\)\?completealiases\>\)\|\%(\%(no_\?\)\?complete_aliases\>\)\| | |
176 \ \%(\%(\<no_\?\)\?completeinword\>\)\|\%(\%(no_\?\)\?complete_in_word\>\)\| | |
177 \ \%(\%(\<no_\?\)\?continueonerror\>\)\|\%(\%(no_\?\)\?continue_on_error\>\)\| | |
178 \ \%(\%(\<no_\?\)\?correct\>\)\| | |
179 \ \%(\%(\<no_\?\)\?correctall\>\)\|\%(\%(no_\?\)\?correct_all\>\)\| | |
180 \ \%(\%(\<no_\?\)\?cprecedences\>\)\|\%(\%(no_\?\)\?c_precedences\>\)\| | |
181 \ \%(\%(\<no_\?\)\?cshjunkiehistory\>\)\|\%(\%(no_\?\)\?csh_junkie_history\>\)\| | |
182 \ \%(\%(\<no_\?\)\?cshjunkieloops\>\)\|\%(\%(no_\?\)\?csh_junkie_loops\>\)\| | |
183 \ \%(\%(\<no_\?\)\?cshjunkiequotes\>\)\|\%(\%(no_\?\)\?csh_junkie_quotes\>\)\| | |
184 \ \%(\%(\<no_\?\)\?csh_nullcmd\>\)\|\%(\%(no_\?\)\?csh_null_cmd\>\)\|\%(\%(no_\?\)\?cshnullcmd\>\)\|\%(\%(no_\?\)\?csh_null_cmd\>\)\| | |
185 \ \%(\%(\<no_\?\)\?cshnullglob\>\)\|\%(\%(no_\?\)\?csh_null_glob\>\)\| | |
186 \ \%(\%(\<no_\?\)\?debugbeforecmd\>\)\|\%(\%(no_\?\)\?debug_before_cmd\>\)\| | |
187 \ \%(\%(\<no_\?\)\?dotglob\>\)\|\%(\%(no_\?\)\?dot_glob\>\)\| | |
188 \ \%(\%(\<no_\?\)\?dvorak\>\)\| | |
189 \ \%(\%(\<no_\?\)\?emacs\>\)\| | |
190 \ \%(\%(\<no_\?\)\?equals\>\)\| | |
191 \ \%(\%(\<no_\?\)\?errexit\>\)\|\%(\%(no_\?\)\?err_exit\>\)\| | |
192 \ \%(\%(\<no_\?\)\?errreturn\>\)\|\%(\%(no_\?\)\?err_return\>\)\| | |
18456 | 193 \ \%(\%(\<no_\?\)\?evallineno\>\)\|\%(\%(no_\?\)\?eval_lineno\>\)\| |
11914 | 194 \ \%(\%(\<no_\?\)\?exec\>\)\| |
195 \ \%(\%(\<no_\?\)\?extendedglob\>\)\|\%(\%(no_\?\)\?extended_glob\>\)\| | |
196 \ \%(\%(\<no_\?\)\?extendedhistory\>\)\|\%(\%(no_\?\)\?extended_history\>\)\| | |
197 \ \%(\%(\<no_\?\)\?flowcontrol\>\)\|\%(\%(no_\?\)\?flow_control\>\)\| | |
198 \ \%(\%(\<no_\?\)\?forcefloat\>\)\|\%(\%(no_\?\)\?force_float\>\)\| | |
199 \ \%(\%(\<no_\?\)\?functionargzero\>\)\|\%(\%(no_\?\)\?function_argzero\>\)\|\%(\%(no_\?\)\?function_arg_zero\>\)\| | |
200 \ \%(\%(\<no_\?\)\?glob\>\)\| | |
201 \ \%(\%(\<no_\?\)\?globalexport\>\)\|\%(\%(no_\?\)\?global_export\>\)\| | |
202 \ \%(\%(\<no_\?\)\?globalrcs\>\)\|\%(\%(no_\?\)\?global_rcs\>\)\| | |
203 \ \%(\%(\<no_\?\)\?globassign\>\)\|\%(\%(no_\?\)\?glob_assign\>\)\| | |
204 \ \%(\%(\<no_\?\)\?globcomplete\>\)\|\%(\%(no_\?\)\?glob_complete\>\)\| | |
205 \ \%(\%(\<no_\?\)\?globdots\>\)\|\%(\%(no_\?\)\?glob_dots\>\)\| | |
206 \ \%(\%(\<no_\?\)\?glob_subst\>\)\|\%(\%(no_\?\)\?globsubst\>\)\| | |
207 \ \%(\%(\<no_\?\)\?globstarshort\>\)\|\%(\%(no_\?\)\?glob_star_short\>\)\| | |
208 \ \%(\%(\<no_\?\)\?hashall\>\)\|\%(\%(no_\?\)\?hash_all\>\)\| | |
209 \ \%(\%(\<no_\?\)\?hashcmds\>\)\|\%(\%(no_\?\)\?hash_cmds\>\)\| | |
210 \ \%(\%(\<no_\?\)\?hashdirs\>\)\|\%(\%(no_\?\)\?hash_dirs\>\)\| | |
211 \ \%(\%(\<no_\?\)\?hashexecutablesonly\>\)\|\%(\%(no_\?\)\?hash_executables_only\>\)\| | |
212 \ \%(\%(\<no_\?\)\?hashlistall\>\)\|\%(\%(no_\?\)\?hash_list_all\>\)\| | |
213 \ \%(\%(\<no_\?\)\?histallowclobber\>\)\|\%(\%(no_\?\)\?hist_allow_clobber\>\)\| | |
214 \ \%(\%(\<no_\?\)\?histappend\>\)\|\%(\%(no_\?\)\?hist_append\>\)\| | |
215 \ \%(\%(\<no_\?\)\?histbeep\>\)\|\%(\%(no_\?\)\?hist_beep\>\)\| | |
216 \ \%(\%(\<no_\?\)\?hist_expand\>\)\|\%(\%(no_\?\)\?histexpand\>\)\| | |
217 \ \%(\%(\<no_\?\)\?hist_expire_dups_first\>\)\|\%(\%(no_\?\)\?histexpiredupsfirst\>\)\| | |
218 \ \%(\%(\<no_\?\)\?histfcntllock\>\)\|\%(\%(no_\?\)\?hist_fcntl_lock\>\)\| | |
219 \ \%(\%(\<no_\?\)\?histfindnodups\>\)\|\%(\%(no_\?\)\?hist_find_no_dups\>\)\| | |
220 \ \%(\%(\<no_\?\)\?histignorealldups\>\)\|\%(\%(no_\?\)\?hist_ignore_all_dups\>\)\| | |
221 \ \%(\%(\<no_\?\)\?histignoredups\>\)\|\%(\%(no_\?\)\?hist_ignore_dups\>\)\| | |
222 \ \%(\%(\<no_\?\)\?histignorespace\>\)\|\%(\%(no_\?\)\?hist_ignore_space\>\)\| | |
223 \ \%(\%(\<no_\?\)\?histlexwords\>\)\|\%(\%(no_\?\)\?hist_lex_words\>\)\| | |
224 \ \%(\%(\<no_\?\)\?histnofunctions\>\)\|\%(\%(no_\?\)\?hist_no_functions\>\)\| | |
225 \ \%(\%(\<no_\?\)\?histnostore\>\)\|\%(\%(no_\?\)\?hist_no_store\>\)\| | |
226 \ \%(\%(\<no_\?\)\?histreduceblanks\>\)\|\%(\%(no_\?\)\?hist_reduce_blanks\>\)\| | |
227 \ \%(\%(\<no_\?\)\?histsavebycopy\>\)\|\%(\%(no_\?\)\?hist_save_by_copy\>\)\| | |
228 \ \%(\%(\<no_\?\)\?histsavenodups\>\)\|\%(\%(no_\?\)\?hist_save_no_dups\>\)\| | |
229 \ \%(\%(\<no_\?\)\?histsubstpattern\>\)\|\%(\%(no_\?\)\?hist_subst_pattern\>\)\| | |
230 \ \%(\%(\<no_\?\)\?histverify\>\)\|\%(\%(no_\?\)\?hist_verify\>\)\| | |
231 \ \%(\%(\<no_\?\)\?hup\>\)\| | |
232 \ \%(\%(\<no_\?\)\?ignorebraces\>\)\|\%(\%(no_\?\)\?ignore_braces\>\)\| | |
233 \ \%(\%(\<no_\?\)\?ignoreclosebraces\>\)\|\%(\%(no_\?\)\?ignore_close_braces\>\)\| | |
234 \ \%(\%(\<no_\?\)\?ignoreeof\>\)\|\%(\%(no_\?\)\?ignore_eof\>\)\| | |
235 \ \%(\%(\<no_\?\)\?incappendhistory\>\)\|\%(\%(no_\?\)\?inc_append_history\>\)\| | |
236 \ \%(\%(\<no_\?\)\?incappendhistorytime\>\)\|\%(\%(no_\?\)\?inc_append_history_time\>\)\| | |
237 \ \%(\%(\<no_\?\)\?interactive\>\)\| | |
238 \ \%(\%(\<no_\?\)\?interactivecomments\>\)\|\%(\%(no_\?\)\?interactive_comments\>\)\| | |
239 \ \%(\%(\<no_\?\)\?ksharrays\>\)\|\%(\%(no_\?\)\?ksh_arrays\>\)\| | |
240 \ \%(\%(\<no_\?\)\?kshautoload\>\)\|\%(\%(no_\?\)\?ksh_autoload\>\)\| | |
241 \ \%(\%(\<no_\?\)\?kshglob\>\)\|\%(\%(no_\?\)\?ksh_glob\>\)\| | |
242 \ \%(\%(\<no_\?\)\?kshoptionprint\>\)\|\%(\%(no_\?\)\?ksh_option_print\>\)\| | |
243 \ \%(\%(\<no_\?\)\?kshtypeset\>\)\|\%(\%(no_\?\)\?ksh_typeset\>\)\| | |
244 \ \%(\%(\<no_\?\)\?kshzerosubscript\>\)\|\%(\%(no_\?\)\?ksh_zero_subscript\>\)\| | |
245 \ \%(\%(\<no_\?\)\?listambiguous\>\)\|\%(\%(no_\?\)\?list_ambiguous\>\)\| | |
246 \ \%(\%(\<no_\?\)\?listbeep\>\)\|\%(\%(no_\?\)\?list_beep\>\)\| | |
247 \ \%(\%(\<no_\?\)\?listpacked\>\)\|\%(\%(no_\?\)\?list_packed\>\)\| | |
248 \ \%(\%(\<no_\?\)\?listrowsfirst\>\)\|\%(\%(no_\?\)\?list_rows_first\>\)\| | |
249 \ \%(\%(\<no_\?\)\?listtypes\>\)\|\%(\%(no_\?\)\?list_types\>\)\| | |
250 \ \%(\%(\<no_\?\)\?localloops\>\)\|\%(\%(no_\?\)\?local_loops\>\)\| | |
251 \ \%(\%(\<no_\?\)\?localoptions\>\)\|\%(\%(no_\?\)\?local_options\>\)\| | |
252 \ \%(\%(\<no_\?\)\?localpatterns\>\)\|\%(\%(no_\?\)\?local_patterns\>\)\| | |
253 \ \%(\%(\<no_\?\)\?localtraps\>\)\|\%(\%(no_\?\)\?local_traps\>\)\| | |
254 \ \%(\%(\<no_\?\)\?log\>\)\| | |
255 \ \%(\%(\<no_\?\)\?login\>\)\| | |
256 \ \%(\%(\<no_\?\)\?longlistjobs\>\)\|\%(\%(no_\?\)\?long_list_jobs\>\)\| | |
257 \ \%(\%(\<no_\?\)\?magicequalsubst\>\)\|\%(\%(no_\?\)\?magic_equal_subst\>\)\| | |
258 \ \%(\%(\<no_\?\)\?mark_dirs\>\)\| | |
259 \ \%(\%(\<no_\?\)\?mailwarn\>\)\|\%(\%(no_\?\)\?mail_warn\>\)\| | |
260 \ \%(\%(\<no_\?\)\?mailwarning\>\)\|\%(\%(no_\?\)\?mail_warning\>\)\| | |
261 \ \%(\%(\<no_\?\)\?markdirs\>\)\| | |
262 \ \%(\%(\<no_\?\)\?menucomplete\>\)\|\%(\%(no_\?\)\?menu_complete\>\)\| | |
263 \ \%(\%(\<no_\?\)\?monitor\>\)\| | |
264 \ \%(\%(\<no_\?\)\?multibyte\>\)\|\%(\%(no_\?\)\?multi_byte\>\)\| | |
265 \ \%(\%(\<no_\?\)\?multifuncdef\>\)\|\%(\%(no_\?\)\?multi_func_def\>\)\| | |
266 \ \%(\%(\<no_\?\)\?multios\>\)\|\%(\%(no_\?\)\?multi_os\>\)\| | |
267 \ \%(\%(\<no_\?\)\?nomatch\>\)\|\%(\%(no_\?\)\?no_match\>\)\| | |
268 \ \%(\%(\<no_\?\)\?notify\>\)\| | |
269 \ \%(\%(\<no_\?\)\?nullglob\>\)\|\%(\%(no_\?\)\?null_glob\>\)\| | |
270 \ \%(\%(\<no_\?\)\?numericglobsort\>\)\|\%(\%(no_\?\)\?numeric_glob_sort\>\)\| | |
271 \ \%(\%(\<no_\?\)\?octalzeroes\>\)\|\%(\%(no_\?\)\?octal_zeroes\>\)\| | |
272 \ \%(\%(\<no_\?\)\?onecmd\>\)\|\%(\%(no_\?\)\?one_cmd\>\)\| | |
273 \ \%(\%(\<no_\?\)\?overstrike\>\)\|\%(\%(no_\?\)\?over_strike\>\)\| | |
274 \ \%(\%(\<no_\?\)\?pathdirs\>\)\|\%(\%(no_\?\)\?path_dirs\>\)\| | |
275 \ \%(\%(\<no_\?\)\?pathscript\>\)\|\%(\%(no_\?\)\?path_script\>\)\| | |
276 \ \%(\%(\<no_\?\)\?physical\>\)\| | |
277 \ \%(\%(\<no_\?\)\?pipefail\>\)\|\%(\%(no_\?\)\?pipe_fail\>\)\| | |
278 \ \%(\%(\<no_\?\)\?posixaliases\>\)\|\%(\%(no_\?\)\?posix_aliases\>\)\| | |
279 \ \%(\%(\<no_\?\)\?posixargzero\>\)\|\%(\%(no_\?\)\?posix_arg_zero\>\)\|\%(\%(no_\?\)\?posix_argzero\>\)\| | |
280 \ \%(\%(\<no_\?\)\?posixbuiltins\>\)\|\%(\%(no_\?\)\?posix_builtins\>\)\| | |
281 \ \%(\%(\<no_\?\)\?posixcd\>\)\|\%(\%(no_\?\)\?posix_cd\>\)\| | |
282 \ \%(\%(\<no_\?\)\?posixidentifiers\>\)\|\%(\%(no_\?\)\?posix_identifiers\>\)\| | |
283 \ \%(\%(\<no_\?\)\?posixjobs\>\)\|\%(\%(no_\?\)\?posix_jobs\>\)\| | |
284 \ \%(\%(\<no_\?\)\?posixstrings\>\)\|\%(\%(no_\?\)\?posix_strings\>\)\| | |
285 \ \%(\%(\<no_\?\)\?posixtraps\>\)\|\%(\%(no_\?\)\?posix_traps\>\)\| | |
286 \ \%(\%(\<no_\?\)\?printeightbit\>\)\|\%(\%(no_\?\)\?print_eight_bit\>\)\| | |
287 \ \%(\%(\<no_\?\)\?printexitvalue\>\)\|\%(\%(no_\?\)\?print_exit_value\>\)\| | |
288 \ \%(\%(\<no_\?\)\?privileged\>\)\| | |
289 \ \%(\%(\<no_\?\)\?promptbang\>\)\|\%(\%(no_\?\)\?prompt_bang\>\)\| | |
290 \ \%(\%(\<no_\?\)\?promptcr\>\)\|\%(\%(no_\?\)\?prompt_cr\>\)\| | |
291 \ \%(\%(\<no_\?\)\?promptpercent\>\)\|\%(\%(no_\?\)\?prompt_percent\>\)\| | |
292 \ \%(\%(\<no_\?\)\?promptsp\>\)\|\%(\%(no_\?\)\?prompt_sp\>\)\| | |
293 \ \%(\%(\<no_\?\)\?promptsubst\>\)\|\%(\%(no_\?\)\?prompt_subst\>\)\| | |
294 \ \%(\%(\<no_\?\)\?promptvars\>\)\|\%(\%(no_\?\)\?prompt_vars\>\)\| | |
295 \ \%(\%(\<no_\?\)\?pushdignoredups\>\)\|\%(\%(no_\?\)\?pushd_ignore_dups\>\)\| | |
296 \ \%(\%(\<no_\?\)\?pushdminus\>\)\|\%(\%(no_\?\)\?pushd_minus\>\)\| | |
297 \ \%(\%(\<no_\?\)\?pushdsilent\>\)\|\%(\%(no_\?\)\?pushd_silent\>\)\| | |
298 \ \%(\%(\<no_\?\)\?pushdtohome\>\)\|\%(\%(no_\?\)\?pushd_to_home\>\)\| | |
299 \ \%(\%(\<no_\?\)\?rcexpandparam\>\)\|\%(\%(no_\?\)\?rc_expandparam\>\)\|\%(\%(no_\?\)\?rc_expand_param\>\)\| | |
300 \ \%(\%(\<no_\?\)\?rcquotes\>\)\|\%(\%(no_\?\)\?rc_quotes\>\)\| | |
301 \ \%(\%(\<no_\?\)\?rcs\>\)\| | |
302 \ \%(\%(\<no_\?\)\?recexact\>\)\|\%(\%(no_\?\)\?rec_exact\>\)\| | |
303 \ \%(\%(\<no_\?\)\?rematchpcre\>\)\|\%(\%(no_\?\)\?re_match_pcre\>\)\|\%(\%(no_\?\)\?rematch_pcre\>\)\| | |
304 \ \%(\%(\<no_\?\)\?restricted\>\)\| | |
305 \ \%(\%(\<no_\?\)\?rmstarsilent\>\)\|\%(\%(no_\?\)\?rm_star_silent\>\)\| | |
306 \ \%(\%(\<no_\?\)\?rmstarwait\>\)\|\%(\%(no_\?\)\?rm_star_wait\>\)\| | |
307 \ \%(\%(\<no_\?\)\?sharehistory\>\)\|\%(\%(no_\?\)\?share_history\>\)\| | |
308 \ \%(\%(\<no_\?\)\?shfileexpansion\>\)\|\%(\%(no_\?\)\?sh_file_expansion\>\)\| | |
309 \ \%(\%(\<no_\?\)\?shglob\>\)\|\%(\%(no_\?\)\?sh_glob\>\)\| | |
310 \ \%(\%(\<no_\?\)\?shinstdin\>\)\|\%(\%(no_\?\)\?shin_stdin\>\)\| | |
311 \ \%(\%(\<no_\?\)\?shnullcmd\>\)\|\%(\%(no_\?\)\?sh_nullcmd\>\)\| | |
312 \ \%(\%(\<no_\?\)\?shoptionletters\>\)\|\%(\%(no_\?\)\?sh_option_letters\>\)\| | |
313 \ \%(\%(\<no_\?\)\?shortloops\>\)\|\%(\%(no_\?\)\?short_loops\>\)\| | |
314 \ \%(\%(\<no_\?\)\?shwordsplit\>\)\|\%(\%(no_\?\)\?sh_word_split\>\)\| | |
315 \ \%(\%(\<no_\?\)\?singlecommand\>\)\|\%(\%(no_\?\)\?single_command\>\)\| | |
316 \ \%(\%(\<no_\?\)\?singlelinezle\>\)\|\%(\%(no_\?\)\?single_line_zle\>\)\| | |
317 \ \%(\%(\<no_\?\)\?sourcetrace\>\)\|\%(\%(no_\?\)\?source_trace\>\)\| | |
318 \ \%(\%(\<no_\?\)\?stdin\>\)\| | |
319 \ \%(\%(\<no_\?\)\?sunkeyboardhack\>\)\|\%(\%(no_\?\)\?sun_keyboard_hack\>\)\| | |
320 \ \%(\%(\<no_\?\)\?trackall\>\)\|\%(\%(no_\?\)\?track_all\>\)\| | |
321 \ \%(\%(\<no_\?\)\?transientrprompt\>\)\|\%(\%(no_\?\)\?transient_rprompt\>\)\| | |
322 \ \%(\%(\<no_\?\)\?trapsasync\>\)\|\%(\%(no_\?\)\?traps_async\>\)\| | |
323 \ \%(\%(\<no_\?\)\?typesetsilent\>\)\|\%(\%(no_\?\)\?type_set_silent\>\)\|\%(\%(no_\?\)\?typeset_silent\>\)\| | |
324 \ \%(\%(\<no_\?\)\?unset\>\)\| | |
325 \ \%(\%(\<no_\?\)\?verbose\>\)\| | |
326 \ \%(\%(\<no_\?\)\?vi\>\)\| | |
18456 | 327 \ \%(\%(\<no_\?\)\?warnnestedvar\>\)\|\%(\%(no_\?\)\?warn_nested_var\>\)\| |
11914 | 328 \ \%(\%(\<no_\?\)\?warncreateglobal\>\)\|\%(\%(no_\?\)\?warn_create_global\>\)\| |
329 \ \%(\%(\<no_\?\)\?xtrace\>\)\| | |
12968 | 330 \ \%(\%(\<no_\?\)\?zle\>\)/ nextgroup=zshOption,zshComment skipwhite contained |
6823 | 331 |
12968 | 332 syn keyword zshTypes float integer local typeset declare private readonly |
7 | 333 |
1125 | 334 " XXX: this may be too much |
335 " syn match zshSwitches '\s\zs--\=[a-zA-Z0-9-]\+' | |
7 | 336 |
1125 | 337 syn match zshNumber '[+-]\=\<\d\+\>' |
338 syn match zshNumber '[+-]\=\<0x\x\+\>' | |
339 syn match zshNumber '[+-]\=\<0\o\+\>' | |
340 syn match zshNumber '[+-]\=\d\+#[-+]\=\w\+\>' | |
341 syn match zshNumber '[+-]\=\d\+\.\d\+\>' | |
7 | 342 |
1698 | 343 " TODO: $[...] is the same as $((...)), so add that as well. |
1125 | 344 syn cluster zshSubst contains=zshSubst,zshOldSubst,zshMathSubst |
345 syn region zshSubst matchgroup=zshSubstDelim transparent | |
7924
00d64eb49ce1
commit https://github.com/vim/vim/commit/681baaf4a4c81418693dcafb81421a8614832e91
Christian Brabandt <cb@256bit.org>
parents:
7477
diff
changeset
|
346 \ start='\$(' skip='\\)' end=')' contains=TOP fold |
00d64eb49ce1
commit https://github.com/vim/vim/commit/681baaf4a4c81418693dcafb81421a8614832e91
Christian Brabandt <cb@256bit.org>
parents:
7477
diff
changeset
|
347 syn region zshParentheses transparent start='(' skip='\\)' end=')' fold |
11400 | 348 syn region zshGlob start='(#' end=')' |
1125 | 349 syn region zshMathSubst matchgroup=zshSubstDelim transparent |
11400 | 350 \ start='\$((' skip='\\)' end='))' |
1125 | 351 \ contains=zshParentheses,@zshSubst,zshNumber, |
7924
00d64eb49ce1
commit https://github.com/vim/vim/commit/681baaf4a4c81418693dcafb81421a8614832e91
Christian Brabandt <cb@256bit.org>
parents:
7477
diff
changeset
|
352 \ @zshDerefs,zshString keepend fold |
1125 | 353 syn region zshBrackets contained transparent start='{' skip='\\}' |
7924
00d64eb49ce1
commit https://github.com/vim/vim/commit/681baaf4a4c81418693dcafb81421a8614832e91
Christian Brabandt <cb@256bit.org>
parents:
7477
diff
changeset
|
354 \ end='}' fold |
8246
f16bfe02cef1
commit https://github.com/vim/vim/commit/f391327adbbffb11180cf6038a92af1ed144e907
Christian Brabandt <cb@256bit.org>
parents:
7924
diff
changeset
|
355 syn region zshBrackets transparent start='{' skip='\\}' |
f16bfe02cef1
commit https://github.com/vim/vim/commit/f391327adbbffb11180cf6038a92af1ed144e907
Christian Brabandt <cb@256bit.org>
parents:
7924
diff
changeset
|
356 \ end='}' contains=TOP fold |
1125 | 357 syn region zshSubst matchgroup=zshSubstDelim start='\${' skip='\\}' |
7924
00d64eb49ce1
commit https://github.com/vim/vim/commit/681baaf4a4c81418693dcafb81421a8614832e91
Christian Brabandt <cb@256bit.org>
parents:
7477
diff
changeset
|
358 \ end='}' contains=@zshSubst,zshBrackets,zshQuoted,zshString fold |
1125 | 359 syn region zshOldSubst matchgroup=zshSubstDelim start=+`+ skip=+\\`+ |
7924
00d64eb49ce1
commit https://github.com/vim/vim/commit/681baaf4a4c81418693dcafb81421a8614832e91
Christian Brabandt <cb@256bit.org>
parents:
7477
diff
changeset
|
360 \ end=+`+ contains=TOP,zshOldSubst fold |
7 | 361 |
6823 | 362 syn sync minlines=50 maxlines=90 |
1698 | 363 syn sync match zshHereDocSync grouphere NONE '<<-\=\s*\%(\\\=\S\+\|\(["']\)\S\+\1\)' |
364 syn sync match zshHereDocEndSync groupthere NONE '^\s*EO\a\+\>' | |
365 | |
1125 | 366 hi def link zshTodo Todo |
367 hi def link zshComment Comment | |
368 hi def link zshPreProc PreProc | |
369 hi def link zshQuoted SpecialChar | |
370 hi def link zshString String | |
371 hi def link zshStringDelimiter zshString | |
372 hi def link zshPOSIXString zshString | |
373 hi def link zshJobSpec Special | |
374 hi def link zshPrecommand Special | |
375 hi def link zshDelimiter Keyword | |
376 hi def link zshConditional Conditional | |
377 hi def link zshException Exception | |
378 hi def link zshRepeat Repeat | |
379 hi def link zshKeyword Keyword | |
380 hi def link zshFunction None | |
381 hi def link zshKSHFunction zshFunction | |
382 hi def link zshHereDoc String | |
6823 | 383 hi def link zshOperator None |
384 hi def link zshRedir Operator | |
1125 | 385 hi def link zshVariable None |
1698 | 386 hi def link zshVariableDef zshVariable |
1125 | 387 hi def link zshDereferencing PreProc |
11400 | 388 hi def link zshShortDeref zshDereferencing |
389 hi def link zshLongDeref zshDereferencing | |
390 hi def link zshDeref zshDereferencing | |
391 hi def link zshDollarVar zshDereferencing | |
1125 | 392 hi def link zshCommands Keyword |
11400 | 393 hi def link zshOptStart Keyword |
394 hi def link zshOption Constant | |
1125 | 395 hi def link zshTypes Type |
396 hi def link zshSwitches Special | |
397 hi def link zshNumber Number | |
398 hi def link zshSubst PreProc | |
399 hi def link zshMathSubst zshSubst | |
400 hi def link zshOldSubst zshSubst | |
401 hi def link zshSubstDelim zshSubst | |
11400 | 402 hi def link zshGlob zshSubst |
7 | 403 |
404 let b:current_syntax = "zsh" | |
405 | |
1125 | 406 let &cpo = s:cpo_save |
407 unlet s:cpo_save |