Mercurial > vim
annotate runtime/doc/pi_tar.txt @ 23843:d97258eca25d v8.2.2463
patch 8.2.2463: using :arglocal in an autocommand may use freed memory
Commit: https://github.com/vim/vim/commit/6bcb877ec19a647443195a54eeac60cb693fd827
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Feb 3 21:23:29 2021 +0100
patch 8.2.2463: using :arglocal in an autocommand may use freed memory
Problem: Using :arglocal in an autocommand may use freed memory.
(houyunsong)
Solution: Check if the arglist is locked.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 03 Feb 2021 21:30:04 +0100 |
parents | 9b7f90e56753 |
children | f8116058ca76 |
rev | line source |
---|---|
19099 | 1 *pi_tar.txt* For Vim version 8.2. Last change: 2020 Jan 07 |
799 | 2 |
1620 | 3 +====================+ |
4 | Tar File Interface | | |
5 +====================+ | |
567 | 6 |
19099 | 7 Author: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM> |
567 | 8 (remove NOSPAM from Campbell's email first) |
19099 | 9 Copyright 2005-2017: *tar-copyright* |
3281 | 10 The VIM LICENSE (see |copyright|) applies to the files in this |
11 package, including tarPlugin.vim, tar.vim, and pi_tar.txt. Like | |
12 anything else that's except use "tar.vim" instead of "VIM". Like | |
13 anything else that's free, tar.vim and its associated files are | |
14 provided *as is* and comes with no warranty of any kind, either | |
15 expressed or implied. No guarantees of merchantability. No | |
16 guarantees of suitability for any purpose. By using this plugin, you | |
17 agree that in no event will the copyright holder be liable for any | |
18 damages resulting from the use of this software. Use at your own risk! | |
567 | 19 |
20 ============================================================================== | |
21 1. Contents *tar* *tar-contents* | |
22 1. Contents..................................................|tar-contents| | |
23 2. Usage.....................................................|tar-usage| | |
819 | 24 3. Options...................................................|tar-options| |
25 4. History...................................................|tar-history| | |
567 | 26 |
27 ============================================================================== | |
28 2. Usage *tar-usage* *tar-manual* | |
29 | |
30 When one edits a *.tar file, this plugin will handle displaying a | |
31 contents page. Select a file to edit by moving the cursor atop | |
32 the desired file, then hit the <return> key. After editing, one may | |
33 also write to the file. Currently, one may not make a new file in | |
34 tar archives via the plugin. | |
35 | |
2426 | 36 *:Vimuntar* |
37 VIMUNTAR~ | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
38 |
2426 | 39 :Vimuntar [vimhome] |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
40 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
41 This command copies, if necessary, the tarball to the .vim or vimfiles |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
42 directory using the first writable directory in the |'runtimepath'| |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
43 when no [vimhome] is specified. Otherwise, the [vimhome] argument |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
44 allows the user to specify that directory, instead. |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
45 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
46 The copy is done using the command in *g:tar_copycmd* , which is > |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
47 cp for cygwin, unix, macunix |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
48 copy for windows (32, 95, 64, 16) |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
49 < The extraction is done with the command specified with |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
50 *g:tar_extractcmd* , which by default is > |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
51 "tar -xf" |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
52 < |
4339 | 53 *:TarDiff* |
54 DIFFERENCING SUPPORT~ | |
55 | |
56 :TarDiff [filename] | |
57 | |
58 This command will attempt to show the differences between the tarball | |
59 version of a file and the associated file on the system. In order to | |
60 find that file on the system, the script uses the path associated with | |
61 the file mentioned in the tarball. If the current directory is not | |
62 correct for that path, :TarDiff will fail to find the associated file. | |
63 | |
64 If the [filename] is given, that that filename (and path) will be used | |
65 to specify the associated file. | |
66 | |
67 | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
68 PREVENTING LOADING~ |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
69 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
70 If for some reason you do not wish to use vim to examine tar'd files, |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
71 you may put the following two variables into your <.vimrc> to prevent |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
72 the tar plugin from loading: > |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
73 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
74 let g:loaded_tarPlugin= 1 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
75 let g:loaded_tar = 1 |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
76 < |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
77 |
567 | 78 ============================================================================== |
819 | 79 3. Options *tar-options* |
80 | |
81 These options are variables that one may change, typically in one's | |
82 <.vimrc> file. | |
1121 | 83 Default |
84 Variable Value Explanation | |
2908 | 85 *g:tar_browseoptions* "Ptf" used to get a list of contents |
86 *g:tar_readoptions* "OPxf" used to extract a file from a tarball | |
87 *g:tar_cmd* "tar" the name of the tar program | |
88 *g:tar_nomax* 0 if true, file window will not be maximized | |
89 *g:tar_secure* undef if exists: | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
90 "--"s will be used to prevent unwanted |
1702 | 91 option expansion in tar commands. |
92 Please be sure that your tar command | |
93 accepts "--"; Posix compliant tar | |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
94 utilities do accept them. |
1702 | 95 if not exists: |
2033
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
96 The tar plugin will reject any tar |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
97 files or member files that begin with |
de5a43c5eedc
Update documentation files.
Bram Moolenaar <bram@zimbu.org>
parents:
1702
diff
changeset
|
98 "-" |
1702 | 99 Not all tar's support the "--" which is why |
100 it isn't default. | |
2908 | 101 *g:tar_writeoptions* "uf" used to update/replace a file |
819 | 102 |
103 | |
104 ============================================================================== | |
105 4. History *tar-history* | |
106 | |
19099 | 107 v31 Apr 02, 2017 * (klartext) reported that browsing encrypted |
108 files in a zip archive created unencrypted | |
109 swap files. I am applying a similar fix | |
110 used on zip.vim to tar.vim: new buffers | |
111 are opened with |:noswapfile|. | |
112 May 16, 2017 * When the mouse option isn't empty, the | |
113 leftmouse can be used to select a file | |
114 in the tar-file listing. | |
115 v30 Apr 22, 2014 * .tgz files are ambiguous: they may have been | |
116 compressed with either gzip or bzip2. Tar.vim | |
117 disambiguates by using unix's "file" command. | |
118 Feb 18, 2016 * Changed =~ to =~# where appropriate | |
119 Feb 18, 2017 * Now also permits xz decompression | |
120 v28 Jun 23, 2011 * a few more decompression options (tbz tb2 txz) | |
121 v27 May 31, 2011 * moved cygwin detection before g:tar_copycmd | |
122 handling | |
123 * inserted additional |:keepj| modifiers | |
124 * changed silent to sil! (|:silent|) | |
125 v26 Aug 09, 2010 * uses buffer-local instead of window variables | |
126 to hold tarfile name | |
127 * inserted keepj before 0d to protect jump list | |
128 v25 Jun 19, 2010 * (Jan Steffens) added support for xz | |
129 compression | |
130 v24 Apr 07, 2009 * :Untarvim command implemented | |
131 Sep 28, 2009 * Added lzma support | |
132 v22 Aug 08, 2008 * security fixes | |
133 v16 Jun 06, 2008 * tarfile:: used instead of tarfile: when | |
134 editing files inside tarballs. Fixes a | |
135 problem with tarballs called things like | |
136 c:\abc.tar. (tnx to Bill McCarthy) | |
137 v14 May 09, 2008 * arno caught a security bug | |
138 May 28, 2008 * various security improvements. Now requires | |
139 patch 299 which provides the fnameescape() | |
140 function | |
141 May 30, 2008 * allows one to view *.gz and *.bz2 files that | |
142 are in *.tar files. | |
143 v12 Sep 07, 2007 * &shq now used if not the empty string for | |
144 g:tar_shq | |
145 v10 May 02, 2006 * now using "redraw then echo" to show messages, | |
146 instead of "echo and prompt user" | |
147 v9 May 02, 2006 * improved detection of masquerading as tar file | |
148 v8 May 02, 2006 * allows editing of files that merely masquerade | |
149 as tar files | |
150 v7 Mar 22, 2006 * work on making tar plugin work across network | |
151 Mar 27, 2006 * g:tar_cmd now available for users to change | |
152 the name of the tar program to be used. By | |
153 default, of course, it's "tar". | |
154 v6 Dec 21, 2005 * writing to files not in directories caused | |
155 problems - fixed (pointed out by | |
156 Christian Robinson) | |
157 v5 Nov 22, 2005 * report option workaround installed | |
158 v3 Sep 16, 2005 * handles writing files in an archive back to | |
159 the archive | |
160 Oct 18, 2005 * <amatch> used instead of <afile> in autocmds | |
161 Oct 18, 2005 * handles writing to compressed archives | |
162 Nov 03, 2005 * handles writing tarfiles across a network | |
163 using netrw#NetWrite() | |
164 v2 * converted to use Vim7's new autoload feature | |
165 by Bram Moolenaar | |
166 v1 (original) * Michael Toren | |
167 (see http://michael.toren.net/code/) | |
567 | 168 |
169 ============================================================================== | |
19116 | 170 vim:tw=78:ts=8:noet:ft=help |