by popular request, comment out compspecs for gzip and bzip2. Added a

conditional to installation section of _file_and_dir() to not bind commented
  out compspecs to commands
This commit is contained in:
ianmacd 2002-01-23 20:35:17 +00:00
parent aa8c28a50a
commit 8a24450eeb

View File

@ -2,7 +2,7 @@
# #
# <![CDATA[ # <![CDATA[
# #
# $Id: bash_completion,v 1.65 2002/01/23 18:24:46 ianmacd Exp $ # $Id: bash_completion,v 1.66 2002/01/23 21:35:17 ianmacd Exp $
# #
# Copyright (C) Ian Macdonald <ian@caliban.org> # Copyright (C) Ian Macdonald <ian@caliban.org>
# #
@ -42,10 +42,10 @@ complete -f cat less more ln strip
# the following section lists completions that are redefined later # the following section lists completions that are redefined later
# START exclude -- do NOT remove this line # START exclude -- do NOT remove this line
complete -f -X '*.bz2' bzip2 #complete -f -X '*.bz2' bzip2
complete -f -X '!*.bz2' bunzip2 complete -f -X '!*.bz2' bunzip2
complete -f -X '!*.+(zip|ZIP|jar|JAR)' unzip complete -f -X '!*.+(zip|ZIP|jar|JAR)' unzip
complete -f -X '*.gz' gzip #complete -f -X '*.gz' gzip
complete -f -X '*.Z' compress complete -f -X '*.Z' compress
complete -f -X '!*.+(Z|gz|tgz|Gz)' gunzip zcat zmore complete -f -X '!*.+(Z|gz|tgz|Gz)' gunzip zcat zmore
complete -f -X '!*.Z' uncompress complete -f -X '!*.Z' uncompress
@ -1605,6 +1605,8 @@ list=( $( sed -ne '/^# START exclude/,/^# FINISH exclude/p' \
( (
while read line while read line
do do
# ignore compspecs that are commented out
if [ "${line#\#}" != "$line" ]; then continue; fi
line=${line%# START exclude*} line=${line%# START exclude*}
line=${line%# FINISH exclude*} line=${line%# FINISH exclude*}
line=${line##*\'} line=${line##*\'}