- {gzip,bzip2} -t should also complete on .gz and .bz2 files, respectively

- man completion still needed one fix for FreeBSD
This commit is contained in:
ianmacd 2002-06-19 14:53:48 +00:00
parent eea13453de
commit 4ba7e8bf72

View File

@ -1,6 +1,6 @@
# bash_completion - some programmable completion functions for bash 2.05a
#
# $Id: bash_completion,v 1.362 2002/06/19 08:18:28 ianmacd Exp $
# $Id: bash_completion,v 1.363 2002/06/19 16:53:48 ianmacd Exp $
#
# Copyright (C) Ian Macdonald <ian@caliban.org>
#
@ -501,7 +501,7 @@ _man()
fi
UNAME=$( uname -s )
if [ $UNAME = GNU -o $UNAME = Linux ]; then
if [ $UNAME = GNU -o $UNAME = Linux -o $UNAME = FreeBSD ]; then
manpath=$( manpath 2>/dev/null || command man --path )
else
manpath=$MANPATH
@ -2282,9 +2282,9 @@ _zip()
cur=${COMP_WORDS[COMP_CWORD]}
prev=${COMP_WORDS[COMP_CWORD-1]}
[ ${COMP_WORDS[0]} = "gzip" ] && xspec="*.gz"
[ ${COMP_WORDS[0]} = "bzip2" ] && xspec="*.bz2"
[[ "$prev" == -*d* ]] && xspec="!"$xspec
[ $1 = "gzip" ] && xspec="*.gz"
[ $1 = "bzip2" ] && xspec="*.bz2"
[[ "$prev" == -*[dt]* ]] && xspec="!"$xspec
_expand || return 0