-
Notifications
You must be signed in to change notification settings - Fork 505
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make the builtin extract
and archive
plugins handle *.tar
formats better
#1548
Comments
I think this is possible, but I have a few questions/concerns:
|
Edit:
It seems that it's available as
Using
Using the provided % tar -tf viddy-v1.0.1-linux-x86_64.tar.gz
viddy Note that unlike % tar -tf test.zip
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Exiting with failure status due to previous errors
Considering both tools can preview/extract, just use the one installed I guess? Edit: |
Windows 10 and 11 come with tar. Links |
Thanks for the info, I didn't know that. I've just tried on a Windows 10 VM, % C:\Users\User\Downloads> tar -tf viddy-v1.0.1-linux-x86_64.tar.gz
viddy |
Thanks for the info! I think it's worth a try. Is anyone interested in implementing it? If it's simple enough and doesn't add too much maintenance overhead (let's say <100 lines), I'd be open to accepting a PR. The code for the |
ya pub extract
- 7z
creates useless complex file structureextract
and archive
plugins handle *.tar
formats better
Hi, @xfzv . Update: After restarting my computer, the 99% disappeared, but the dir still looks the same. |
@DirkFi I've just tried on my Arch Linux install and it behaves as I mentioned in OP, the extract task isn't stuck and I eventually have the
If you manage to get the task stuck at 99% again, open the task manager and press Enter to see more details about it.
Can you try with another tarball maybe? Which version of % yazi -V
Yazi 0.3.2 (ddb8ce5 2024-08-28) Anything in |
Sorry about the misunderstanding, seems that I misunderstands your point. The image I shared with you actually reproduced the problem but I did not notice that and thought it was not the issue. Right now I understand that the issue is for tar.gz file it needs to unzip twice to get the original file and create some redundant dirs. BTW, how to open the task manager inside Yazi? |
With https://github.com/sxyazi/yazi/blob/main/yazi-config/preset/keymap.toml#L146-L147 |
Fix in PR1583. |
I'm going to lock this issue because it has been closed for 30 days. ⏳ |
What system are you running Yazi on?
Linux X11
What terminal are you running Yazi in?
kitty 0.35.2
yazi --debug
outputDid you try the latest nightly build to see if the problem got fixed?
Yes, and I updated the debug information above (
yazi --debug
) to the nightly that I triedDescribe the bug
When extracting a
tar.gz
archive that contains a single file in it (no directory):with default
extract
openeryazi/yazi-config/preset/yazi.toml
Line 49 in 69c20d4
Here's what happens:
archive
)archive.tar
file is created insidearchive
directoryEnter
to extract thearchive.tar
file, another directory calledarchive
is createdarchive
directory, we finally havebinary
binary
file permissions are not preserved (644, is actually 755)The final file hierarchy structure:
I'm aware this is the default
7z
behavior (can reproduce with7z x archive.tar.gz
)but this is really not convenient. With:
% tar -xvz archive.tar.gz
the binary is directly extracted to the current directory and permissions are preserved.
Any chance the extract feature could be more optimized? In this case,
tar
is definitely more suitable than7z
.Minimal reproducer
tar.gz
file~/.config/yazi
directory, reproduce steps detailed inDescribe the bug
to extract thetar.gz
archive and observe the final file structureAnything else?
No response
The text was updated successfully, but these errors were encountered: