aboutsummaryrefslogtreecommitdiff
path: root/runtime/ftplugin/zig.vim
Commit message (Collapse)AuthorAge
* vim-patch:cd8a3eaf5348Christian Clason2023-11-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | runtime(dist): centralize safe executable check and add vim library (vim/vim#13413) Follow up to 816fbcc26 (patch 9.0.1833: [security] runtime file fixes, 2023-08-31) and f7ac0ef50 (runtime: don't execute external commands when loading ftplugins, 2023-09-06). This puts the logic for safe executable checks in a single place, by introducing a central vim library, so all filetypes benefit from consistency. Notable changes: - dist#vim because the (autoload) namespace for a new runtime support library. Supporting functions should get documentation. It might make life easier for NeoVim devs to make the documentation a new file rather than cram it into existing files, though we may want cross-references to it somewhere… - The gzip and zip plugins need to be opted into by enabling execution of those programs (or the global plugin_exec). This needs documentation or discussion. - This fixes a bug in the zig plugin: code setting s:tmp_cwd was removed in f7ac0ef50 (runtime: don't execute external commands when loading ftplugins, 2023-09-06), but the variable was still referenced. Since the new function takes care of that automatically, the variable is no longer needed. https://github.com/vim/vim/commit/cd8a3eaf5348feacfecab4b374b7ea4ce6a97422 Co-authored-by: D. Ben Knoble <ben.knoble+github@gmail.com>
* vim-patch:e08bfef88bd0Gregory Anders2023-10-19
| | | | | | | | | | | runtime(zig): Update Zig runtime files (vim/vim#13388) Update runtime files from upstream (https://github.com/zig/zig.vim) at commit 54c216e5306a5c3878a60596aacb94dca8652ab9. https://github.com/vim/vim/commit/e08bfef88bd05a9d27ee16c57cd10173e280f600 Co-authored-by: Gregory Anders <8965202+gpanders@users.noreply.github.com>
* vim-patch:partial:9.0.1886: Various Typoszeertzjq2023-09-09
| | | | | | | | | | | | | | | | | | | Problem: Various Typos Solution: Fix Typos This is a collection of typo related commits. closes: vim/vim#12753 closes: vim/vim#13016 https://github.com/vim/vim/commit/ee17b6f70d382ec6c5d8d27b56c4e84106ac8c55 Co-authored-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Adri Verhoef <a3@a3.xs4all.nl> Co-authored-by: Viktor Szépe <viktor@szepe.net> Co-authored-by: nuid64 <lvkuzvesov@proton.me> Co-authored-by: Meng Xiangzhuo <aumo@foxmail.com> Co-authored-by: Dominique Pellé <dominique.pelle@gmail.com>
* vim-patch:f7ac0ef50988Christian Clason2023-09-07
| | | | | | | | | | | | | | | | | | | | | | | | | runtime: don't execute external commands when loading ftplugins This is a followup to 816fbcc262687b81fc46f82f7bbeb1453addfe0c (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: vim/vim#13034 https://github.com/vim/vim/commit/f7ac0ef5098856bedca26e7073594a407c05636f Co-authored-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Tim Pope <vim@tpope.org>
* vim-patch:67c951df4c95Christian Clason2023-09-07
| | | | | | | | | | | | | | | | | runtime(ftplugin): allow to exec if curdir is in PATH In case the current directory is present as valid $PATH entry, it is OK to call the program from it, even if vim curdir is in that same directory. (Without that patch, for instance, you will not be able to open .zip files while your current directory is /bin) closes: vim/vim#13027 https://github.com/vim/vim/commit/67c951df4c95981c716eeedb1b102d9668549e65 Co-authored-by: Anton Sharonov <anton.sharonov@gmail.com>
* vim-patch:9.0.1833: [security] runtime file fixes (#24969)zeertzjq2023-09-01
| | | | | | | | | | | | | | | | | | | | | | Problem: runtime files may execute code in current dir Solution: only execute, if not run from current directory The perl, zig and ruby filetype plugins and the zip and gzip autoload plugins may try to load malicious executable files from the current working directory. This is especially a problem on windows, where the current directory is implicitly in your $PATH and windows may even run a file with the extension `.bat` because of $PATHEXT. So make sure that we are not trying to execute a file from the current directory. If this would be the case, error out (for the zip and gzip) plugins or silently do not run those commands (for the ftplugins). This assumes, that only the current working directory is bad. For all other directories, it is assumed that those directories were intentionally set to the $PATH by the user. https://github.com/vim/vim/commit/816fbcc262687b81fc46f82f7bbeb1453addfe0c Co-authored-by: Christian Brabandt <cb@256bit.org>
* vim-patch:3fc7a7e44abdChristian Clason2023-08-24
| | | | | | | | | | runtime: Fix typos in various files closes: vim/vim#12836 https://github.com/vim/vim/commit/3fc7a7e44abda6505ccd39a6d067db6e5173cbf6 Co-authored-by: Viktor Szépe <viktor@szepe.net>
* vim-patch:86b4816766d9 (#21314)Christian Clason2022-12-08
Update runtime files https://github.com/vim/vim/commit/86b4816766d976a7ecd4403eca1f8bf6b4105800 vim-patch:9.0.1029: autoload directory missing from distribution Problem: Autoload directory missing from distribution. Solution: Add the autoload/zig directory to the list of distributed files. https://github.com/vim/vim/commit/84dbf855fb2d883481f74ad0ccf3df3f8837e6bf Co-authored-by: Bram Moolenaar <Bram@vim.org>