Describe the bug
.tzst
extension is an equivalent of .tar.zst
, however, vim seems to handle them differently.
While it correctly opens .tar.zst
as an archive, it seems to open .tzst
as a file, thus mangling it.
Here's an example on two identical files named differently:
Environment (please complete the following information):
vim --version
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Mar 26 2021 00:21:09)
Included patches: 1-2653
Compiled by Arch Linux
Terminal: Konsole
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
I think this needs a patch to $VIMRUNTIME/plugin/tar.vim Something like this:
diff --git a/runtime/plugin/tarPlugin.vim b/runtime/plugin/tarPlugin.vim index d55492a93..5fe459912 100644 --- a/runtime/plugin/tarPlugin.vim +++ b/runtime/plugin/tarPlugin.vim @@ -46,6 +46,7 @@ augroup tar au BufReadCmd *.txz call tar#Browse(expand("<amatch>")) au BufReadCmd *.tar.zst call tar#Browse(expand("<amatch>")) au BufReadCmd *.tzs call tar#Browse(expand("<amatch>")) + au BufReadCmd *.tzst call tar#Browse(expand("<amatch>")) augroup END com! -nargs=? -complete=file Vimuntar call tar#Vimuntar(<q-args>)
Actually, I wonder whether *.tzs
was meant to mean *.tzst
? ping @cecamp
I can put it in, but I don't have *.tzs or *.tar.zst maps in tarPlugin.vim. I have no idea how they got there, nor whether *.tzs was a typo. Currently, until I get pure-ftp working, I cannot upload anything to my own website, so it'll be a bit before I get to uploading it. I'll have to leave it to you and the anonymous contributor that tar.vim handles these zst files acceptably.
Closed #8105.
I don't have *.tzs or *.tar.zst maps in tarPlugin.vim
I have no idea how they got there
They are in master - https://github.com/vim/vim/blob/master/runtime/plugin/tarPlugin.vim#L47-L48
And apparently the change was introduced with this commit, which introduced .tar.zst and .tzs so it is definitely a typo.
tzst finds tensorflow results?
tzs is probably short for tar-zstd, like tgz is short for tar-gzip.
That's what tzst
is, tzs
is just a misspelling of that.
See the linked wikipedia article above, peazip, archiver and libarchive for good measure, they all use tzst
.
I have to use what the web service wants, which used to be ftp but now is pure-ftp. Pure-ftp encrypts the password, as I understand (whereas ftp does not).
The tar plugin also has to be made aware of how to decompress zst files. C0rn3j -- please send updates concerning plugins I maintain to me, not to github. I'll look into peazip.
The tar plugin also has to be made aware of how to decompress zst files.
As you can see on the screenshot, it ALREADY handles .tar.zst files just fine.
All this needs is an extension fixup.
Just to add to this, not that I think it's needed - .tzs
seems to be a script extension for TUGZip.
Yes, tar.zst is clearly the full name. The question is what the short name would be, like .tgz for .tar.gz
The reason .tgz is used is that there are systems that don't support two dots in a file name.
I'm not sure if there also is a three letter limit, like we used to have on FAT.
I cannot find any actual use of .tzs for a compressed tar file. Not sure if it is a typo or someone tried to use the three character limit, but it doesn't look like it's used.
Supporting .tzst would be useful for those systems that don't support two dots. We would then have to assume this is actually used, I have never seen one. It is mentioned on https://fileinfo.com/extension/tzst
Since we're in agreement that .tzs
which is already there is wrong, and the other formats also use the shorthand, and various sites, libraries and wikipedia agree that the shorthand for zstd is .tzst
, is there anything stopping #8109 from being accepted?
Or at least have this issue reopened, since it still is a problem.
I see that the PR failed a single test on macOS, but I am not sure if that was a fluke and rerunning the CI test will make it pass, or whether this actually breaks some test somehow.
The question is what the short name would be, like .tgz for .tar.gz
*.tzst = *.tar.zst
Source: GNU tar manual.
=== BEGIN QUOTE https://www.gnu.org/software/tar/manual/tar.html#gzip ===
Suffix | Compression program
‘.gz’ | gzip
‘.tgz’ | gzip
‘.taz’ | gzip
‘.Z’ | compress
‘.taZ’ | compress
‘.bz2’ | bzip2
‘.tz2’ | bzip2
‘.tbz2’ | bzip2
‘.tbz’ | bzip2
‘.lz’ | lzip
‘.lzma’ | lzma
‘.tlz’ | lzma
‘.lzo’ | lzop
‘.xz’ | xz
‘.zst’ | zstd
‘.tzst’ | zstd
=== END QUOTE ===
I should add: besides *.tzst
, there are several other extensions in the gnu tar manual link I provided in my previous comment not supported by vim (e.g. *.taz
, *.taZ
, *tbz2
, …). Some of them seem rarely used though. But the GNU tar manual is authoritative enough to support them.
—