diff --git a/modules/archive/README.md b/modules/archive/README.md index a1d49011..fca34cf1 100644 --- a/modules/archive/README.md +++ b/modules/archive/README.md @@ -25,7 +25,7 @@ installed: - *.xz* requires `unxz`. - *.lzma* requires `unlzma`. - *.Z* requires `uncompress`. - - *.zip* requires `unzip`. + - *.zip*, *.jar* requires `unzip`. - *.rar* requires `unrar` or `rar`. - *.7z* requires `7za`. - *.deb* requires `ar`, `tar`. diff --git a/modules/archive/functions/_lsarchive b/modules/archive/functions/_lsarchive index 00f83e05..f2cee881 100644 --- a/modules/archive/functions/_lsarchive +++ b/modules/archive/functions/_lsarchive @@ -10,4 +10,4 @@ _arguments \ '(-v --verbose)'{-v,--remove}'[verbose archive listing]' \ - "*::archive file:_files -g '(#i)*.(tar|tgz|tbz|tbz2|txz|tlz|gz|bz2|xz|lzma|Z|zip|rar|7z)(-.)'" && return 0 + "*::archive file:_files -g '(#i)*.(tar|tgz|tbz|tbz2|txz|tlz|gz|bz2|xz|lzma|Z|zip|jar|rar|7z)(-.)'" && return 0 diff --git a/modules/archive/functions/_unarchive b/modules/archive/functions/_unarchive index aceb27b6..90e32f1a 100644 --- a/modules/archive/functions/_unarchive +++ b/modules/archive/functions/_unarchive @@ -10,4 +10,4 @@ _arguments \ '(-r --remove)'{-r,--remove}'[remove archive]' \ - "*::archive file:_files -g '(#i)*.(tar|tgz|tbz|tbz2|txz|tlz|gz|bz2|xz|lzma|Z|zip|rar|7z|deb)(-.)'" && return 0 + "*::archive file:_files -g '(#i)*.(tar|tgz|tbz|tbz2|txz|tlz|gz|bz2|xz|lzma|Z|zip|jar|rar|7z|deb)(-.)'" && return 0 diff --git a/modules/archive/functions/lsarchive b/modules/archive/functions/lsarchive index 7ac61450..6b1b321a 100644 --- a/modules/archive/functions/lsarchive +++ b/modules/archive/functions/lsarchive @@ -40,7 +40,7 @@ while (( $# > 0 )); do && tar --lzma -t${verbose:+v}f "$1" \ || lzcat "$1" | tar x${verbose:+v}f - ;; (*.tar) tar t${verbose:+v}f "$1" ;; - (*.zip) unzip -l${verbose:+v} "$1" ;; + (*.zip|*.jar) unzip -l${verbose:+v} "$1" ;; (*.rar) unrar &> /dev/null \ && unrar ${${verbose:+v}:-l} "$1" \ || rar ${${verbose:+v}:-l} "$1" ;; diff --git a/modules/archive/functions/unarchive b/modules/archive/functions/unarchive index 72dfbd1f..fac77ff6 100644 --- a/modules/archive/functions/unarchive +++ b/modules/archive/functions/unarchive @@ -54,7 +54,7 @@ while (( $# > 0 )); do (*.xz) unxz "$1" ;; (*.lzma) unlzma "$1" ;; (*.Z) uncompress "$1" ;; - (*.zip) unzip "$1" -d $extract_dir ;; + (*.zip|*.jar) unzip "$1" -d $extract_dir ;; (*.rar) unrar &> /dev/null \ && unrar x -ad "$1" \ || rar x -ad "$1" ;;