file-roller: Reuse unzip's xspec.

master
Ville Skyttä 2013-06-15 00:35:33 +03:00
parent 5a9e8f219b
commit 42196ef7fc
1 changed files with 3 additions and 1 deletions

View File

@ -5,7 +5,7 @@ _file_roller()
local cur prev words cword split
_init_completion -s || return
local exts='@(7z|ace|alz|ar|arj|[bglx]z|bz2|tb?(z)2|cab|cb[rz]|iso?(9660)|Z|t[abglx]z|cpio|deb|[ejrw]ar|exe|?(g)tar|gem|lh[az]|lzh|?(t)lrz|lzma|lzo|wim|swm|rpm|sit|zip|zoo)'
local exts='@(7z|ace|alz|ar|arj|[bglx]z|bz2|tb?(z)2|cab|cb[rz]|iso?(9660)|Z|t[abglx]z|cpio|deb|rar|?(g)tar|gem|lh[az]|lzh|?(t)lrz|lzma|lzo|wim|swm|rpm|sit|zoo)'
case $prev in
-'?'|--help|--help-all|--help-gtk|--help-sm-client)
@ -16,6 +16,7 @@ _file_roller()
return
;;
-a|--add-to)
_filedir_xspec unzip
_filedir "$exts"
return
;;
@ -34,6 +35,7 @@ _file_roller()
return
fi
_filedir_xspec unzip
_filedir "$exts"
} &&
complete -F _file_roller file-roller