diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index c41237b862..4cb29205a5 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -4353,6 +4353,33 @@ This is not allowed when the textlock is active: - closing a window or quitting Vim - etc. +============================================================================== +Vim script library *vim-script-library* + +Vim comes bundled with a Vim script library, that can be used by runtime, +script authors. Currently, it only includes very few functions, but it may +grow over time. + + *dist#vim* +The functions make use of the autoloaded prefix "dist#vim". + +The following functions are available: + +dist#vim#IsSafeExecutable(filetype, executable) ~ + +This function takes a filetype and an executable and checks whether it is safe +to execute the given executable. For security reasons users may not want to +have Vim execute random executables or may have forbidden to do so for +specific filetypes by setting the "_exec" variable (|plugin_exec|). + +It returns |TRUE| or |FALSE| to indicate whether the plugin should run the given +exectuable. It takes the following arguments: + + argument type ~ + + filetype string + executable string + ============================================================================== Command-line expressions highlighting *expr-highlight* diff --git a/runtime/doc/pi_gzip.txt b/runtime/doc/pi_gzip.txt index a709b34180..1aadc103fd 100644 --- a/runtime/doc/pi_gzip.txt +++ b/runtime/doc/pi_gzip.txt @@ -12,9 +12,17 @@ The functionality mentioned here is a |standard-plugin|. This plugin is only available if 'compatible' is not set. You can avoid loading this plugin by setting the "loaded_gzip" variable: > :let loaded_gzip = 1 +< + *g:gzip_exec* + +For security reasons, one may prevent that Vim runs executables automatically +when opening a buffer. This option (default: "1") can be used to prevent +executing the executables command when set to "0": > + :let g:gzip_exec = 0 +< ============================================================================== -1. Autocommands *gzip-autocmd* +2. Autocommands *gzip-autocmd* The plugin installs autocommands to intercept reading and writing of files with these extensions: diff --git a/runtime/doc/pi_zip.txt b/runtime/doc/pi_zip.txt index 343c73839b..a8e1b8df10 100644 --- a/runtime/doc/pi_zip.txt +++ b/runtime/doc/pi_zip.txt @@ -69,6 +69,13 @@ Copyright: Copyright (C) 2005-2015 Charles E Campbell *zip-copyright* This option specifies the program (and any options needed) used to extract a file from a zip archive. By default, > let g:zip_extractcmd= g:zip_unzipcmd +< + *g:zip_exec* + For security reasons, one may prevent that Vim runs executables + automatically when opening a buffer. This option (default: "1") + can be used to prevent executing the "unzip" command when set to + "0": > + let g:zip_exec=0 < PREVENTING LOADING~