Can i archive selected files in vifm?
For example, you can define zip command in your vifmrc file (the check is to do nothing if you forget to specify name):
zip
vifmrc
command! zip if [ -n "%a" ]; then \ zip -r '%a.zip' %f; \ fi
Then do the selection and run
:zip archive-name
Just to expand this based on issue 709
Here is a version that archives:
command! zip if [ -n "%a" ]; then \ zip -r '%a.zip' %f; \ elseif [ "%c" = "%f" ]; then \ zip -r %c.zip %c; \ else \ zip -r %d:t.zip %f; \ fi
Changed %c == %f to "%c" = "%f" or it probably won't work due to comparing one value to many.
%c == %f
"%c" = "%f"