aboutsummaryrefslogtreecommitdiff
path: root/runtime/syntax
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/syntax')
-rw-r--r--runtime/syntax/zsh.vim76
1 files changed, 43 insertions, 33 deletions
diff --git a/runtime/syntax/zsh.vim b/runtime/syntax/zsh.vim
index 5e588e7d6c..162577669f 100644
--- a/runtime/syntax/zsh.vim
+++ b/runtime/syntax/zsh.vim
@@ -2,7 +2,7 @@
" Language: Zsh shell script
" Maintainer: Christian Brabandt <cb@256bit.org>
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2015-05-29
+" Latest Revision: 2015-12-25
" License: Vim (see :h license)
" Repository: https://github.com/chrisbra/vim-zsh
@@ -125,20 +125,29 @@ syn keyword zshCommands alias autoload bg bindkey break bye cap cd
\ zsocket zstyle ztcp
" Options, generated by: echo ${(j:\n:)options[(I)*]} | sort
+" Create a list of option names from zsh source dir:
+" #!/bin/zsh
+" topdir=/path/to/zsh-xxx
+" grep '^pindex([A-Za-z_]*)$' $topdir/Src/Doc/Zsh/optionsyo |
+" while read opt
+" do
+" echo ${${(L)opt#pindex\(}%\)}
+" done
+
syn case ignore
syn keyword zshOptions aliases allexport all_export alwayslastprompt
- \ always_lastprompt alwaystoend always_to_end
- \ appendhistory append_history autocd autocontinue
+ \ always_last_prompt always_lastprompt alwaystoend always_to_end appendcreate
+ \ append_create appendhistory append_history autocd auto_cd autocontinue
\ auto_continue autolist auto_list
\ automenu auto_menu autonamedirs auto_name_dirs
\ autoparamkeys auto_param_keys autoparamslash
\ auto_param_slash autopushd auto_pushd autoremoveslash
- \ auto_remove_slash autoresume auto_resume badpattern
+ \ auto_remove_slash autoresume auto_resume badpattern bad_pattern
\ banghist bang_hist bareglobqual bare_glob_qual
\ bashautolist bash_auto_list bashrematch bash_rematch
- \ beep bgnice braceccl brace_ccl braceexpand brace_expand
+ \ beep bgnice bg_nice braceccl brace_ccl braceexpand brace_expand
\ bsdecho bsd_echo caseglob case_glob casematch case_match
- \ cbases cdablevars cd_able_vars chasedots chase_dots
+ \ cbases c_bases cdablevars cdable_vars cd_able_vars chasedots chase_dots
\ chaselinks chase_links checkjobs check_jobs
\ clobber combiningchars combining_chars completealiases
\ complete_aliases completeinword complete_in_word
@@ -146,17 +155,17 @@ syn keyword zshOptions aliases allexport all_export alwayslastprompt
\ correctall correct_all cprecedences c_precedences
\ cshjunkiehistory csh_junkie_history cshjunkieloops
\ csh_junkie_loops cshjunkiequotes csh_junkie_quotes
- \ cshnullcmd csh_null_cmd cshnullglob csh_null_glob
+ \ csh_nullcmd csh_null_cmd cshnullcmd csh_null_cmd cshnullglob csh_null_glob
\ debugbeforecmd debug_before_cmd dotglob dot_glob dvorak
\ emacs equals errexit err_exit errreturn err_return evallineno
\ eval_lineno exec extendedglob extended_glob extendedhistory
\ extended_history flowcontrol flow_control forcefloat
- \ force_float functionargzero function_arg_zero glob globalexport
+ \ force_float functionargzero function_argzero function_arg_zero glob globalexport
\ global_export globalrcs global_rcs globassign glob_assign
\ globcomplete glob_complete globdots glob_dots glob_subst
- \ globsubst hashall hash_all hashcmds hash_cmds hashdirs
- \ hash_dirs hashexecutablesonly hash_executables_only hashlistall
- \ hash_list_all histallowclobber hist_allow_clobber histappend
+ \ globsubst globstarshort glob_star_short hashall hash_all hashcmds
+ \ hash_cmds hashdirs hash_dirs hashexecutablesonly hash_executables_only
+ \ hashlistall hash_list_all histallowclobber hist_allow_clobber histappend
\ hist_append histbeep hist_beep hist_expand hist_expire_dups_first
\ histexpand histexpiredupsfirst histfcntllock hist_fcntl_lock
\ histfindnodups hist_find_no_dups histignorealldups
@@ -184,7 +193,7 @@ syn keyword zshOptions aliases allexport all_export alwayslastprompt
\ numeric_glob_sort octalzeroes octal_zeroes onecmd one_cmd
\ overstrike over_strike pathdirs path_dirs pathscript
\ path_script physical pipefail pipe_fail posixaliases
- \ posix_aliases posixargzero posix_arg_zero posixbuiltins
+ \ posix_aliases posixargzero posix_arg_zero posix_argzero posixbuiltins
\ posix_builtins posixcd posix_cd posixidentifiers posix_identifiers
\ posixjobs posix_jobs posixstrings posix_strings posixtraps
\ posix_traps printeightbit print_eight_bit printexitvalue
@@ -192,8 +201,8 @@ syn keyword zshOptions aliases allexport all_export alwayslastprompt
\ prompt_cr promptpercent prompt_percent promptsp prompt_sp
\ promptsubst prompt_subst promptvars prompt_vars pushdignoredups
\ pushd_ignore_dups pushdminus pushd_minus pushdsilent pushd_silent
- \ pushdtohome pushd_to_home rcexpandparam rc_expandparam rcquotes
- \ rc_quotes rcs recexact rec_exact rematchpcre re_match_pcre
+ \ pushdtohome pushd_to_home rcexpandparam rc_expandparam rc_expand_param rcquotes
+ \ rc_quotes rcs recexact rec_exact rematchpcre re_match_pcre rematch_pcre
\ restricted rmstarsilent rm_star_silent rmstarwait rm_star_wait
\ sharehistory share_history shfileexpansion sh_file_expansion
\ shglob sh_glob shinstdin shin_stdin shnullcmd sh_nullcmd
@@ -201,22 +210,22 @@ syn keyword zshOptions aliases allexport all_export alwayslastprompt
\ sh_word_split singlecommand single_command singlelinezle single_line_zle
\ sourcetrace source_trace stdin sunkeyboardhack sun_keyboard_hack
\ trackall track_all transientrprompt transient_rprompt
- \ trapsasync trapasync typesetsilent type_set_silent unset verbose vi
+ \ trapsasync traps_async typesetsilent type_set_silent typeset_silent unset verbose vi
\ warncreateglobal warn_create_global xtrace zle
syn keyword zshOptions noaliases no_aliases noallexport no_allexport noall_export no_all_export noalwayslastprompt no_alwayslastprompt
- \ noalways_lastprompt no_always_lastprompt noalwaystoend no_alwaystoend noalways_to_end no_always_to_end
- \ noappendhistory no_appendhistory noappend_history no_append_history noautocd no_autocd noautocontinue no_autocontinue
- \ noauto_continue no_auto_continue noautolist no_autolist noauto_list no_auto_list
- \ noautomenu no_automenu noauto_menu no_auto_menu noautonamedirs no_autonamedirs noauto_name_dirs no_auto_name_dirs
- \ noautoparamkeys no_autoparamkeys noauto_param_keys no_auto_param_keys noautoparamslash no_autoparamslash
+ \ noalways_lastprompt no_always_lastprompt no_always_last_prompt noalwaystoend no_alwaystoend noalways_to_end no_always_to_end
+ \ noappendcreate no_appendcreate no_append_create noappendhistory no_appendhistory noappend_history no_append_history noautocd
+ \ no_autocd no_auto_cd noautocontinue no_autocontinue noauto_continue no_auto_continue noautolist no_autolist noauto_list
+ \ no_auto_list noautomenu no_automenu noauto_menu no_auto_menu noautonamedirs no_autonamedirs noauto_name_dirs
+ \ no_auto_name_dirs noautoparamkeys no_autoparamkeys noauto_param_keys no_auto_param_keys noautoparamslash no_autoparamslash
\ noauto_param_slash no_auto_param_slash noautopushd no_autopushd noauto_pushd no_auto_pushd noautoremoveslash no_autoremoveslash
- \ noauto_remove_slash no_auto_remove_slash noautoresume no_autoresume noauto_resume no_auto_resume nobadpattern no_badpattern
+ \ noauto_remove_slash no_auto_remove_slash noautoresume no_autoresume noauto_resume no_auto_resume nobadpattern no_badpattern no_bad_pattern
\ nobanghist no_banghist nobang_hist no_bang_hist nobareglobqual no_bareglobqual nobare_glob_qual no_bare_glob_qual
\ nobashautolist no_bashautolist nobash_auto_list no_bash_auto_list nobashrematch no_bashrematch nobash_rematch no_bash_rematch
- \ nobeep no_beep nobgnice no_bgnice nobraceccl no_braceccl nobrace_ccl no_brace_ccl nobraceexpand no_braceexpand nobrace_expand no_brace_expand
+ \ nobeep no_beep nobgnice no_bgnice no_bg_nice nobraceccl no_braceccl nobrace_ccl no_brace_ccl nobraceexpand no_braceexpand nobrace_expand no_brace_expand
\ nobsdecho no_bsdecho nobsd_echo no_bsd_echo nocaseglob no_caseglob nocase_glob no_case_glob nocasematch no_casematch nocase_match no_case_match
- \ nocbases no_cbases nocdablevars no_cdablevars nocd_able_vars no_cd_able_vars nochasedots no_chasedots nochase_dots no_chase_dots
+ \ nocbases no_cbases no_c_bases nocdablevars no_cdablevars no_cdable_vars nocd_able_vars no_cd_able_vars nochasedots no_chasedots nochase_dots no_chase_dots
\ nochaselinks no_chaselinks nochase_links no_chase_links nocheckjobs no_checkjobs nocheck_jobs no_check_jobs
\ noclobber no_clobber nocombiningchars no_combiningchars nocombining_chars no_combining_chars nocompletealiases no_completealiases
\ nocomplete_aliases no_complete_aliases nocompleteinword no_completeinword nocomplete_in_word no_complete_in_word
@@ -224,14 +233,15 @@ syn keyword zshOptions noaliases no_aliases noallexport no_allexport no
\ nocorrectall no_correctall nocorrect_all no_correct_all nocprecedences no_cprecedences noc_precedences no_c_precedences
\ nocshjunkiehistory no_cshjunkiehistory nocsh_junkie_history no_csh_junkie_history nocshjunkieloops no_cshjunkieloops
\ nocsh_junkie_loops no_csh_junkie_loops nocshjunkiequotes no_cshjunkiequotes nocsh_junkie_quotes no_csh_junkie_quotes
- \ nocshnullcmd no_cshnullcmd nocsh_null_cmd no_csh_null_cmd nocshnullglob no_cshnullglob nocsh_null_glob no_csh_null_glob
+ \ nocshnullcmd no_cshnullcmd no_csh_nullcmd nocsh_null_cmd no_csh_null_cmd nocshnullglob no_cshnullglob nocsh_null_glob no_csh_null_glob
\ nodebugbeforecmd no_debugbeforecmd nodebug_before_cmd no_debug_before_cmd nodotglob no_dotglob nodot_glob no_dot_glob nodvorak no_dvorak
\ noemacs no_emacs noequals no_equals noerrexit no_errexit noerr_exit no_err_exit noerrreturn no_errreturn noerr_return no_err_return noevallineno no_evallineno
\ noeval_lineno no_eval_lineno noexec no_exec noextendedglob no_extendedglob noextended_glob no_extended_glob noextendedhistory no_extendedhistory
\ noextended_history no_extended_history noflowcontrol no_flowcontrol noflow_control no_flow_control noforcefloat no_forcefloat
- \ noforce_float no_force_float nofunctionargzero no_functionargzero nofunction_arg_zero no_function_arg_zero noglob no_glob noglobalexport no_globalexport
+ \ noforce_float no_force_float nofunctionargzero no_functionargzero nofunction_arg_zero no_function_argzero no_function_arg_zero noglob no_glob noglobalexport no_globalexport
\ noglobal_export no_global_export noglobalrcs no_globalrcs noglobal_rcs no_global_rcs noglobassign no_globassign noglob_assign no_glob_assign
- \ noglobcomplete no_globcomplete noglob_complete no_glob_complete noglobdots no_globdots noglob_dots no_glob_dots noglob_subst no_glob_subst
+ \ noglobcomplete no_globcomplete noglob_complete no_glob_complete noglobdots no_globdots noglob_dots no_glob_dots
+ \ noglobstarshort no_glob_star_short noglob_subst no_glob_subst
\ noglobsubst no_globsubst nohashall no_hashall nohash_all no_hash_all nohashcmds no_hashcmds nohash_cmds no_hash_cmds nohashdirs no_hashdirs
\ nohash_dirs no_hash_dirs nohashexecutablesonly no_hashexecutablesonly nohash_executables_only no_hash_executables_only nohashlistall no_hashlistall
\ nohash_list_all no_hash_list_all nohistallowclobber no_histallowclobber nohist_allow_clobber no_hist_allow_clobber nohistappend no_histappend
@@ -262,7 +272,7 @@ syn keyword zshOptions noaliases no_aliases noallexport no_allexport no
\ nonumeric_glob_sort no_numeric_glob_sort nooctalzeroes no_octalzeroes nooctal_zeroes no_octal_zeroes noonecmd no_onecmd noone_cmd no_one_cmd
\ nooverstrike no_overstrike noover_strike no_over_strike nopathdirs no_pathdirs nopath_dirs no_path_dirs nopathscript no_pathscript
\ nopath_script no_path_script nophysical no_physical nopipefail no_pipefail nopipe_fail no_pipe_fail noposixaliases no_posixaliases
- \ noposix_aliases no_posix_aliases noposixargzero no_posixargzero noposix_arg_zero no_posix_arg_zero noposixbuiltins no_posixbuiltins
+ \ noposix_aliases no_posix_aliases noposixargzero no_posixargzero no_posix_argzero noposix_arg_zero no_posix_arg_zero noposixbuiltins no_posixbuiltins
\ noposix_builtins no_posix_builtins noposixcd no_posixcd noposix_cd no_posix_cd noposixidentifiers no_posixidentifiers noposix_identifiers no_posix_identifiers
\ noposixjobs no_posixjobs noposix_jobs no_posix_jobs noposixstrings no_posixstrings noposix_strings no_posix_strings noposixtraps no_posixtraps
\ noposix_traps no_posix_traps noprinteightbit no_printeightbit noprint_eight_bit no_print_eight_bit noprintexitvalue no_printexitvalue
@@ -270,8 +280,8 @@ syn keyword zshOptions noaliases no_aliases noallexport no_allexport no
\ noprompt_cr no_prompt_cr nopromptpercent no_promptpercent noprompt_percent no_prompt_percent nopromptsp no_promptsp noprompt_sp no_prompt_sp
\ nopromptsubst no_promptsubst noprompt_subst no_prompt_subst nopromptvars no_promptvars noprompt_vars no_prompt_vars nopushdignoredups no_pushdignoredups
\ nopushd_ignore_dups no_pushd_ignore_dups nopushdminus no_pushdminus nopushd_minus no_pushd_minus nopushdsilent no_pushdsilent nopushd_silent no_pushd_silent
- \ nopushdtohome no_pushdtohome nopushd_to_home no_pushd_to_home norcexpandparam no_rcexpandparam norc_expandparam no_rc_expandparam norcquotes no_rcquotes
- \ norc_quotes no_rc_quotes norcs no_rcs norecexact no_recexact norec_exact no_rec_exact norematchpcre no_rematchpcre nore_match_pcre no_re_match_pcre
+ \ nopushdtohome no_pushdtohome nopushd_to_home no_pushd_to_home norcexpandparam no_rcexpandparam norc_expandparam no_rc_expandparam no_rc_expand_param norcquotes no_rcquotes
+ \ norc_quotes no_rc_quotes norcs no_rcs norecexact no_recexact norec_exact no_rec_exact norematchpcre no_rematchpcre nore_match_pcre no_re_match_pcre no_rematch_pcre
\ norestricted no_restricted normstarsilent no_rmstarsilent norm_star_silent no_rm_star_silent normstarwait no_rmstarwait norm_star_wait no_rm_star_wait
\ nosharehistory no_sharehistory noshare_history no_share_history noshfileexpansion no_shfileexpansion nosh_file_expansion no_sh_file_expansion
\ noshglob no_shglob nosh_glob no_sh_glob noshinstdin no_shinstdin noshin_stdin no_shin_stdin noshnullcmd no_shnullcmd nosh_nullcmd no_sh_nullcmd
@@ -279,11 +289,11 @@ syn keyword zshOptions noaliases no_aliases noallexport no_allexport no
\ nosh_word_split no_sh_word_split nosinglecommand no_singlecommand nosingle_command no_single_command nosinglelinezle no_singlelinezle nosingle_line_zle no_single_line_zle
\ nosourcetrace no_sourcetrace nosource_trace no_source_trace nostdin no_stdin nosunkeyboardhack no_sunkeyboardhack nosun_keyboard_hack no_sun_keyboard_hack
\ notrackall no_trackall notrack_all no_track_all notransientrprompt no_transientrprompt notransient_rprompt no_transient_rprompt
- \ notrapsasync no_trapsasync notrapasync no_trapasync notypesetsilent no_typesetsilent notype_set_silent no_type_set_silent nounset no_unset noverbose no_verbose novi no_vi
- \ nowarncreateglobal no_warncreateglobal nowarn_create_global no_warn_create_global noxtrace no_xtrace nozle no_zle
+ \ notrapsasync no_trapsasync notrapasync no_trapasync no_traps_async notypesetsilent no_typesetsilent notype_set_silent no_type_set_silent no_typeset_silent \nounset no_unset
+ \ noverbose no_verbose novi no_vi nowarncreateglobal no_warncreateglobal nowarn_create_global no_warn_create_global noxtrace no_xtrace nozle no_zle
syn case match
-syn keyword zshTypes float integer local typeset declare
+syn keyword zshTypes float integer local typeset declare private
" XXX: this may be too much
" syn match zshSwitches '\s\zs--\=[a-zA-Z0-9-]\+'
@@ -303,7 +313,7 @@ syn region zshMathSubst matchgroup=zshSubstDelim transparent
\ start='\$((' skip='\\)'
\ matchgroup=zshSubstDelim end='))'
\ contains=zshParentheses,@zshSubst,zshNumber,
- \ @zshDerefs,zshString
+ \ @zshDerefs,zshString keepend
syn region zshBrackets contained transparent start='{' skip='\\}'
\ end='}'
syn region zshSubst matchgroup=zshSubstDelim start='\${' skip='\\}'