Is there any way or plugin for zsh where I can browse content of zip files in place instead of unzipping zip file and than making zip again?

I want to achieve same behavior as in Midnight Commander one can browse content of zip files without extracting them.

Many thanks for any suggestion.

  • What do you mean with "and then making zip again"? I presented a zsh solution to browse the contents and display files from an archive -- IMHO a modification of a zip'd file with the midnight commander is also not possible. – mpy Feb 28 '14 at 11:32

The autocompletion can "look" into archives. To display the content of a file you can use the -p parameter of unzip, which prints the decompressed file to stdout.

As a demonstration I zipped the source code of zsh itself into an zip archive:

$ unzip -p zsh-src.zip zsh-5.0.5/M[TAB]
file from archive                                    |  autocompletion!
MACHINES     Makefile.in  META-FAQ     Misc          |
$ unzip -p zsh-src.zip zsh-5.0.5/MACHINES | head

These are the OSes that zsh has been tried on.  If you succeed in getting
zsh to work on an OS not listed, let us know.  The information in this
list may be out of date, as the developers do not have access to all
machines.  In general, GNU/Linux distributions, Solaris and Cygwin are
reasonably well covered.  Please let us have any recent information
on other systems.  The information for systems not known to have been

This also works with tar archives, e.g. using

$ tar xOf zsh-5.0.5.tar.bz2 zsh-5.0.5/MACHINES | head

where the file inside the archive of course gets autocompleted, too.


Regular unzip command should not delete the original .zip file. It is strange that this is how it behaves for you. Half of your solution is to modify your unzip command so that it does not delete the original .zip file after extracting.

Looking around I have not found a ability for zsh to do that. However, I did find this question that should be useful to you: How to mount a zip file as a file system?

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.