- make gzip work with .tgz files, not just .gz files

This commit is contained in:
ianmacd 2002-12-04 04:43:34 +00:00
parent 4d4ab0f472
commit c6bc8e0184

View File

@ -1,6 +1,6 @@
# bash_completion - some programmable completion functions for bash 2.05b
#
# $Id: bash_completion,v 1.465 2002/12/04 05:37:03 ianmacd Exp $
# $Id: bash_completion,v 1.466 2002/12/04 05:43:34 ianmacd Exp $
#
# Copyright (C) Ian Macdonald <ian@caliban.org>
#
@ -2475,7 +2475,7 @@ _zip()
cur=${COMP_WORDS[COMP_CWORD]}
prev=${COMP_WORDS[COMP_CWORD-1]}
[ $1 = "gzip" ] && xspec="*.gz"
[ $1 = "gzip" ] && xspec="*.?(t)gz"
[ $1 = "bzip2" ] && xspec="*.bz2"
[[ "$prev" == -*[dt]* ]] && xspec="!"$xspec