From: Oleg Broytman Date: Sat, 17 Jan 2015 18:05:24 +0000 (+0300) Subject: mc.menu refactoring: create a directory for archive X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=9123f0017d75078d7bf2b05c9b47bf187c006279;p=dotfiles.git mc.menu refactoring: create a directory for archive --- diff --git a/.mc/menu b/.mc/menu index 5d3845e..3862c3b 100644 --- a/.mc/menu +++ b/.mc/menu @@ -292,6 +292,22 @@ Y zip these files/directories with recoded filenames + t r & f \.tar\.bz2$ u Extract from tar-bzip2 exec bzip2 -cd %f | tar xpvf - ++ F \.tar\.bz2$ | F \.tar\.gz$ | F \.tgz$ | F \.tar\.lz$ | F \.tar\.lzma$ | F \.(zip|ZIP)$ | F \.(rar|RAR)$ | F \.7z$ | F \.xz$ & T r +N Create a directory for the other archive + case %D/%F in + *.tar.bz2) D="`basename %F .tar.bz2`";; + *.tar.gz) D="`basename %F .tar.gz`";; + *.tgz) D="`basename %F .tgz`";; + *.tar.lz) D="`basename %F .tar.lz`";; + *.tar.lzma) D="`basename %F .tar.lzma`";; + *.zip) D="`basename %F .zip`";; + *.ZIP) D="`basename %F .ZIP`";; + *.rar) D="`basename %F .rar`";; + *.RAR) D="`basename %F .RAR`";; + *.7z) D="`basename %F .7z`";; + *.xz) D="`basename %F .xz`";; + esac + exec mkdir "$D" + f \.tar\.gz$ | f \.tgz$ & t r u Extract from tar-gzip @@ -353,34 +369,6 @@ U Extract from 7zip U Extract from tar-xz exec xz -cd %D/%F | tar xpvf - -+ f \.tar\.bz2$ | f \.tar\.gz$ | f \.tgz$ | f \.(zip|ZIP)$ | f \.(rar|RAR)$ | f \.7z$ & t r -n Create a directory for this archive - case %f in - *.tar.bz2) D="`basename %f .tar.bz2`";; - *.tar.gz) D="`basename %f .tar.gz`";; - *.tgz) D="`basename %f .tgz`";; - *.zip) D="`basename %f .zip`";; - *.ZIP) D="`basename %f .ZIP`";; - *.rar) D="`basename %f .rar`";; - *.RAR) D="`basename %f .RAR`";; - *.7z) D="`basename %f .7z`";; - esac - exec mkdir "$D" - -+ F \.tar\.bz2$ | F \.tar\.gz$ | F \.tgz$ | F \.(zip|ZIP)$ | F \.(rar|RAR)$ | F \.7z$ & T r -N Create a directory for this archive - case %F in - *.tar.bz2) D="`basename %F .tar.bz2`";; - *.tar.gz) D="`basename %F .tar.gz`";; - *.tgz) D="`basename %F .tgz`";; - *.zip) D="`basename %F .zip`";; - *.ZIP) D="`basename %F .ZIP`";; - *.rar) D="`basename %F .rar`";; - *.RAR) D="`basename %F .RAR`";; - *.7z) D="`basename %F .7z`";; - esac - exec mkdir "$D" - + t r v View via mailcap exec see %f