Add pigz and unpigz completion.

This commit is contained in:
Ville Skyttä 2010-01-18 18:54:39 +02:00
parent 6f235980a8
commit df1a02baa5
3 changed files with 4 additions and 4 deletions

View File

@ -30,7 +30,7 @@ bash-completion (2.x)
vncviewer, yp-tools, and general hostname completions. vncviewer, yp-tools, and general hostname completions.
* Add abook and wtf completion, based on work by Raphaël Droz. * Add abook and wtf completion, based on work by Raphaël Droz.
* Add cvsps, dragon, fusermount, jarsigner, k3b, lftpget, pm-utils, rtcwake, * Add cvsps, dragon, fusermount, jarsigner, k3b, lftpget, pm-utils, rtcwake,
pack200 and unpack200 completions. pack200, unpack200, pigz and unpigz completions.
* Don't overwrite other host completions when completing from multiple * Don't overwrite other host completions when completing from multiple
SSH known hosts files. SSH known hosts files.
* Speed up installed rpm package completion on SUSE, based on work by * Speed up installed rpm package completion on SUSE, based on work by

View File

@ -73,7 +73,7 @@ complete -f -X '!*.?(t)bz?(2)' bunzip2 bzcat
complete -f -X '!*.@(zip|ZIP|jar|JAR|exe|EXE|pk3|war|wsz|ear|zargo|xpi|sxw|ott|od[fgpst]|epub)' unzip zipinfo complete -f -X '!*.@(zip|ZIP|jar|JAR|exe|EXE|pk3|war|wsz|ear|zargo|xpi|sxw|ott|od[fgpst]|epub)' unzip zipinfo
complete -f -X '*.Z' compress znew complete -f -X '*.Z' compress znew
# zcmp, zdiff, z*grep, zless, zmore intentionally not here, see Debian: #455510 # zcmp, zdiff, z*grep, zless, zmore intentionally not here, see Debian: #455510
complete -f -X '!*.@(Z|gz|tgz|Gz|dz)' gunzip zcat complete -f -X '!*.@(Z|gz|tgz|Gz|dz)' gunzip zcat unpigz
complete -f -X '!*.Z' uncompress complete -f -X '!*.Z' uncompress
# lzcmp, lzdiff intentionally not here, see Debian: #455510 # lzcmp, lzdiff intentionally not here, see Debian: #455510
complete -f -X '!*.lzma' lzcat lzegrep lzfgrep lzgrep lzless lzmore unlzma complete -f -X '!*.lzma' lzcat lzegrep lzfgrep lzgrep lzless lzmore unlzma

View File

@ -1,6 +1,6 @@
# bash completion for gzip # bash completion for gzip
have gzip && have gzip || have pigz &&
_gzip() _gzip()
{ {
local cur prev xspec helpopts local cur prev xspec helpopts
@ -37,7 +37,7 @@ _gzip()
COMPREPLY=( $( compgen -f -X "$xspec" -- "$cur" ) \ COMPREPLY=( $( compgen -f -X "$xspec" -- "$cur" ) \
$( compgen -d -- "$cur" ) ) $( compgen -d -- "$cur" ) )
} && } &&
complete -F _gzip -o filenames gzip complete -F _gzip -o filenames gzip pigz
# Local variables: # Local variables:
# mode: shell-script # mode: shell-script