diff options
author | Ville Skyttä <ville.skytta@iki.fi> | 2010-01-18 20:32:03 +0200 |
---|---|---|
committer | Ville Skyttä <ville.skytta@iki.fi> | 2010-01-18 20:32:03 +0200 |
commit | 0b6baead5c270c362db3c84eb25fb46b5285827f (patch) | |
tree | 169ccbd082c7b1ee63f5ec095dd3dce03fae5f57 | |
parent | 08e746ea109366cd1ba6b52cb02e95c094726876 (diff) | |
download | bash-completion-0b6baead5c270c362db3c84eb25fb46b5285827f.tar.gz |
Parse pigz options from pigz, not gzip, option completion improvements.
-rw-r--r-- | CHANGES | 6 | ||||
-rw-r--r-- | contrib/gzip | 11 |
2 files changed, 12 insertions, 5 deletions
@@ -25,9 +25,9 @@ bash-completion (2.x) * Apply cardctl completion to pccardctl too. * Apply pine completion to alpine too. * Remove many unnecessary short option completions where long ones exist. - * Improve chsh, configure, cvs, gkrellm, lftp, look, mdadm, modprobe, mplayer, - mysqladmin, rsync, screen, service, scp, ssh, sshfs, update-alternatives, - vncviewer, yp-tools, and general hostname completions. + * Improve chsh, configure, cvs, gkrellm, gzip, lftp, look, mdadm, modprobe, + mplayer, mysqladmin, rsync, screen, service, scp, ssh, sshfs, + update-alternatives, vncviewer, yp-tools, and general hostname completions. * Add abook and wtf completion, based on work by Raphaël Droz. * Add cvsps, dragon, fusermount, jarsigner, k3b, lftpget, pm-utils, rtcwake, pack200, unpack200, pbzip2, pbunzip2, pbzcat, pigz and unpigz completions. diff --git a/contrib/gzip b/contrib/gzip index 94f8c9df..08243857 100644 --- a/contrib/gzip +++ b/contrib/gzip @@ -8,10 +8,17 @@ _gzip() COMPREPLY=() cur=`_get_cword` prev=${COMP_WORDS[COMP_CWORD-1]} - helpopts=`_parse_help gzip` + helpopts=`_parse_help ${COMP_WORDS[0]}` + + case $prev in + -b|--blocksize|-p|--processes|-S|--suffix|-h|--help|-V|--version) + return 0 + ;; + esac if [[ "$cur" == -* ]]; then - COMPREPLY=( $( compgen -W "$helpopts -2 -3 -4 -5 -6 -7 -8" -- "$cur" ) ) + COMPREPLY=( $( compgen -W "$helpopts -1 -2 -3 -4 -5 -6 -7 -8 -9" \ + -- "$cur" ) ) return 0 fi |