Support .jar and .aar files in unzip completions

I've been dealing with these a lot recently (android dev...), and it's
pretty annoying that unzip completions don't recognize them (They're
just zip files with a weird file extension).
This commit is contained in:
Thom Chiovoloni 2020-04-06 08:03:41 -07:00 committed by Fabian Homborg
parent ff68bdceba
commit e658a88ab0

View file

@ -28,7 +28,11 @@ complete -c unzip -s M -d "pipe through `more` pager"
if unzip -v 2>/dev/null | string match -eq Debian if unzip -v 2>/dev/null | string match -eq Debian
# the first non-switch argument should be the zipfile # the first non-switch argument should be the zipfile
complete -c unzip -n __fish_is_first_token -xa '(__fish_complete_suffix .zip)' complete -c unzip -n __fish_is_first_token -xa '(
__fish_complete_suffix .zip
__fish_complete_suffix .jar
__fish_complete_suffix .aar
)'
# Files thereafter are either files to include or exclude from the operation # Files thereafter are either files to include or exclude from the operation
set -l zipfile set -l zipfile