1
0
forked from aniani/vim
Files
vim/runtime/ftplugin
Christian Brabandt f7ac0ef509 runtime: don't execute external commands when loading ftplugins
This is a followup to 816fbcc262 (patch
9.0.1833: [security] runtime file fixes)

It basically disables that external commands are run on loading of the
filetype plugin, **unless** the user has set the `g:plugin_exec = 1`
global variable in their configuration or for a specific filetype the
variable g:<filetype>_exec=1.

There are a few more plugins, that may execute system commands like
debchangelog, gitcommit, sh, racket, zsh, ps1 but those do at least
do not run those commands by default during loading of the filetype plugin
(there the command is mostly run as convenience for auto-completion or
to provide documentation lookup).

closes: #13034

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Tim Pope <vim@tpope.org>
2023-09-06 20:41:25 +02:00
..
2021-09-21 20:09:51 +02:00
2017-03-05 17:04:09 +01:00
2022-10-16 13:11:12 +01:00
2021-01-25 21:14:57 +01:00
2017-03-05 17:04:09 +01:00
2022-03-08 21:35:07 +00:00
2022-10-28 20:47:54 +01:00
2017-03-05 17:04:09 +01:00
2022-03-08 21:35:07 +00:00
2017-03-05 17:04:09 +01:00
2022-07-01 18:45:04 +01:00
2017-03-05 17:04:09 +01:00
2022-07-25 15:42:07 +01:00
2010-01-06 20:54:52 +01:00
2017-03-05 17:04:09 +01:00
2017-03-05 17:04:09 +01:00
2018-12-27 23:59:26 +01:00
2004-06-13 20:20:40 +00:00
2022-09-27 17:30:34 +01:00
2021-08-14 21:25:52 +02:00
2022-03-30 10:51:39 +01:00
2018-09-02 21:07:30 +02:00
2020-08-15 18:55:18 +02:00
2017-03-05 17:04:09 +01:00
2022-03-08 21:35:07 +00:00
2022-06-03 21:59:47 +01:00
2022-08-15 18:51:32 +01:00
2023-06-10 21:40:39 +01:00
2017-03-05 17:04:09 +01:00
2022-09-18 13:04:22 +01:00
2022-12-06 18:20:10 +00:00
2022-03-08 21:35:07 +00:00
2022-03-08 21:35:07 +00:00
2020-12-23 13:56:35 +01:00
2017-03-05 17:04:09 +01:00
2023-02-02 13:59:48 +00:00
2017-03-05 17:04:09 +01:00
2022-07-29 21:36:21 +01:00
2017-03-05 17:04:09 +01:00
2017-03-05 17:04:09 +01:00
2017-03-05 17:04:09 +01:00
2012-04-25 19:07:41 +02:00
2014-08-29 15:12:19 +02:00
2023-02-20 20:44:55 +00:00
2021-09-09 21:55:11 +02:00
2022-03-08 21:35:07 +00:00
2008-06-24 21:16:56 +00:00
2016-02-25 00:00:01 +01:00
2017-03-05 17:04:09 +01:00
2022-09-27 17:30:34 +01:00
2022-04-27 15:25:03 +01:00
2022-10-03 18:04:35 +01:00
2017-03-05 17:04:09 +01:00
2022-07-25 15:42:07 +01:00
2020-10-11 13:57:40 +02:00
2023-06-10 21:40:39 +01:00
2022-07-01 18:45:04 +01:00
2006-04-30 18:54:39 +00:00
2022-06-03 21:59:47 +01:00
2021-05-02 17:19:11 +02:00
2021-01-25 21:14:57 +01:00
2022-07-01 18:45:04 +01:00
2021-01-11 19:40:15 +01:00
2007-05-05 18:24:42 +00:00
2017-11-02 22:58:42 +01:00
2022-09-18 13:04:22 +01:00
2022-09-18 13:04:22 +01:00
2022-09-10 13:13:14 +01:00
2022-01-08 21:51:59 +00:00
2010-01-06 20:54:52 +01:00
2022-09-10 13:13:14 +01:00
2022-01-08 21:51:59 +00:00
2010-01-06 20:54:52 +01:00
2014-08-22 19:21:47 +02:00
2021-09-21 20:09:51 +02:00
2016-05-24 20:02:38 +02:00
2017-03-05 17:04:09 +01:00
2017-03-05 17:04:09 +01:00
2022-09-27 17:30:34 +01:00
2019-12-05 22:47:25 +01:00
2021-01-25 21:14:57 +01:00
2019-01-01 15:32:17 +01:00
2016-01-10 15:59:26 +01:00
2015-11-01 16:49:04 +01:00
2017-03-05 17:04:09 +01:00
2017-03-05 17:04:09 +01:00
2022-07-25 15:42:07 +01:00
2007-05-05 18:24:42 +00:00
2021-12-16 14:41:10 +00:00
2022-06-17 15:42:40 +01:00
2021-11-21 21:13:36 +00:00
2022-08-19 17:15:35 +01:00
2022-03-08 21:35:07 +00:00
2020-08-30 17:20:20 +02:00
2020-08-30 17:20:20 +02:00
2019-12-03 22:49:09 +01:00
2021-11-27 10:57:26 +00:00
2022-09-10 13:13:14 +01:00
2022-03-08 21:35:07 +00:00
2021-08-14 21:25:52 +02:00
2015-06-09 19:44:55 +02:00
2012-03-28 20:51:51 +02:00
2017-03-05 17:04:09 +01:00
2015-01-07 16:57:10 +01:00
2017-03-05 17:04:09 +01:00
2017-03-05 17:04:09 +01:00
2017-03-05 17:04:09 +01:00
2022-03-19 15:18:53 +00:00
2021-03-31 20:07:33 +02:00
2023-04-22 22:40:14 +01:00
2023-02-02 13:59:48 +00:00
2017-03-05 17:04:09 +01:00
2017-03-05 17:04:09 +01:00
2018-08-11 18:00:22 +02:00
2018-08-11 18:00:22 +02:00
2023-04-22 22:40:14 +01:00
2023-05-14 18:50:25 +01:00
2022-09-10 13:13:14 +01:00
2022-06-14 17:41:28 +01:00
2022-06-14 17:41:28 +01:00
2017-03-05 17:04:09 +01:00
2017-03-05 17:04:09 +01:00
2017-03-05 17:04:09 +01:00
2023-04-22 22:40:14 +01:00
2017-03-05 17:04:09 +01:00
2022-10-16 13:11:12 +01:00
2022-04-27 15:25:03 +01:00
2021-09-09 21:55:11 +02:00
2022-11-23 23:46:31 +00:00
2021-11-07 20:27:04 +00:00
2022-08-15 18:51:32 +01:00
2019-01-26 17:41:47 +01:00
2021-04-17 16:31:09 +02:00
2022-06-14 17:41:28 +01:00
2022-08-15 18:51:32 +01:00
2017-03-05 17:04:09 +01:00
2007-05-05 17:56:55 +00:00
2008-06-24 21:16:56 +00:00
2017-03-05 17:04:09 +01:00
2017-11-02 22:58:42 +01:00
2023-04-22 22:40:14 +01:00
2020-11-29 14:36:24 +01:00
2021-10-23 12:08:41 +01:00
2022-11-23 23:46:31 +00:00
2021-09-09 21:55:11 +02:00
2021-09-09 21:55:11 +02:00
2022-10-28 20:47:54 +01:00
2017-03-05 17:04:09 +01:00
2022-03-08 21:35:07 +00:00
2017-03-05 17:04:09 +01:00
2008-06-24 21:56:24 +00:00
2022-08-08 15:42:38 +01:00
2017-03-05 17:04:09 +01:00
2022-06-14 17:41:28 +01:00
2022-10-16 13:11:12 +01:00
2021-03-13 13:28:13 +01:00
2017-03-05 17:04:09 +01:00
2017-03-05 17:04:09 +01:00
2017-03-05 17:04:09 +01:00
2021-04-07 21:07:20 +02:00
2021-04-07 21:07:20 +02:00
2020-10-11 13:57:40 +02:00
2022-01-29 22:20:48 +00:00
2019-07-19 22:05:51 +02:00
2017-03-05 17:04:09 +01:00
2023-02-27 15:49:53 +00:00
2023-02-27 15:49:53 +00:00
2017-03-05 17:04:09 +01:00
2022-08-30 20:26:34 +01:00
2021-04-21 18:09:37 +02:00
2004-06-13 20:20:40 +00:00
2014-01-23 14:24:41 +01:00
2022-04-27 15:25:03 +01:00
2023-02-27 15:49:53 +00:00
2023-04-22 22:40:14 +01:00
2017-03-05 17:04:09 +01:00
2023-04-22 22:40:14 +01:00
2021-11-16 19:18:26 +00:00
2020-10-26 21:12:46 +01:00
2023-04-22 22:40:14 +01:00
2023-08-23 21:20:00 +02:00
2019-12-05 22:47:25 +01:00
2017-05-27 16:45:17 +02:00
2021-08-14 21:25:52 +02:00
2017-03-05 17:04:09 +01:00
2023-08-19 12:13:31 +02:00
2017-03-05 17:04:09 +01:00
2017-03-05 17:04:09 +01:00
2017-03-05 17:04:09 +01:00
2022-03-08 21:35:07 +00:00
2023-08-29 22:24:37 +02:00
2017-03-05 17:04:09 +01:00
2017-03-05 17:04:09 +01:00
2017-03-05 17:04:09 +01:00
2017-03-05 17:04:09 +01:00
2021-12-16 14:41:10 +00:00
2022-05-21 13:08:16 +01:00
2023-08-23 21:20:00 +02:00
2022-10-16 13:11:12 +01:00
2022-03-08 21:35:07 +00:00
2022-07-29 21:36:21 +01:00
2021-01-11 19:40:15 +01:00
2017-03-05 17:04:09 +01:00
2021-09-09 21:55:11 +02:00
2022-06-14 17:41:28 +01:00
2022-03-08 21:35:07 +00:00
2017-03-05 17:04:09 +01:00
2021-09-09 21:55:11 +02:00
2019-01-17 16:07:22 +01:00
2023-08-23 21:20:00 +02:00
2021-10-16 15:23:36 +01:00
2017-03-05 17:04:09 +01:00
2022-06-14 17:41:28 +01:00
2020-08-15 18:55:18 +02:00
2020-08-15 18:55:18 +02:00
2017-03-05 17:04:09 +01:00
2017-03-05 17:04:09 +01:00
2023-08-09 16:50:52 +02:00
2017-03-05 17:04:09 +01:00
2023-06-10 21:40:39 +01:00
2021-11-21 21:13:36 +00:00
2022-09-18 13:04:22 +01:00
2017-08-27 16:52:01 +02:00
2014-08-22 19:21:47 +02:00
2022-07-01 18:45:04 +01:00
2018-07-31 22:23:58 +02:00
2022-05-07 21:54:03 +01:00
2022-05-07 21:54:03 +01:00
2017-03-05 17:04:09 +01:00
2017-03-05 17:04:09 +01:00
2022-03-08 21:35:07 +00:00
2017-03-05 17:04:09 +01:00
2022-03-08 21:35:07 +00:00
2017-03-05 17:04:09 +01:00
2022-06-14 17:41:28 +01:00
2022-03-08 21:35:07 +00:00
2022-04-27 15:25:03 +01:00
2020-03-14 08:19:51 +01:00

The ftplugin directory is for Vim plugin scripts that are only used for a
specific filetype.

All files ending in .vim in this directory and subdirectories will be sourced
by Vim when it detects the filetype that matches the name of the file or
subdirectory.
For example, these are all loaded for the "c" filetype:

	c.vim
	c_extra.vim
	c/settings.vim

Note that the "_" in "c_extra.vim" is required to separate the filetype name
from the following arbitrary name.

The filetype plugins are only loaded when the ":filetype plugin" command has
been used.

The default filetype plugin files contain settings that 95% of the users will
want to use.  They do not contain personal preferences, like the value of
'shiftwidth'.

If you want to do additional settings, or overrule the default filetype
plugin, you can create your own plugin file.  See ":help ftplugin" in Vim.