Skip to content

Instantly share code, notes, and snippets.

@Karneades
Created May 5, 2020 19:19
Show Gist options
  • Save Karneades/853ebe155d7cdad7407917cb5817b34d to your computer and use it in GitHub Desktop.
Save Karneades/853ebe155d7cdad7407917cb5817b34d to your computer and use it in GitHub Desktop.
Add zip and unzip functionality to Midnight Commander's user menu (F2)
+ t r & ! t t
u Zip or unzip selected file
if [ %x = "zip" ]; then
unzip %f
else
zip %b.zip %f
fi
+ t t
u Zip tagged files
echo -n "Archive name [archive]: "
read filename
[ "$filename"x = x ] && filename="archive"
zip "$filename".zip %t
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment