- {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:
parent
eea13453de
commit
4ba7e8bf72
@ -1,6 +1,6 @@
|
|||||||
# bash_completion - some programmable completion functions for bash 2.05a
|
# 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>
|
# Copyright (C) Ian Macdonald <ian@caliban.org>
|
||||||
#
|
#
|
||||||
@ -501,7 +501,7 @@ _man()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
UNAME=$( uname -s )
|
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 )
|
manpath=$( manpath 2>/dev/null || command man --path )
|
||||||
else
|
else
|
||||||
manpath=$MANPATH
|
manpath=$MANPATH
|
||||||
@ -2282,9 +2282,9 @@ _zip()
|
|||||||
cur=${COMP_WORDS[COMP_CWORD]}
|
cur=${COMP_WORDS[COMP_CWORD]}
|
||||||
prev=${COMP_WORDS[COMP_CWORD-1]}
|
prev=${COMP_WORDS[COMP_CWORD-1]}
|
||||||
|
|
||||||
[ ${COMP_WORDS[0]} = "gzip" ] && xspec="*.gz"
|
[ $1 = "gzip" ] && xspec="*.gz"
|
||||||
[ ${COMP_WORDS[0]} = "bzip2" ] && xspec="*.bz2"
|
[ $1 = "bzip2" ] && xspec="*.bz2"
|
||||||
[[ "$prev" == -*d* ]] && xspec="!"$xspec
|
[[ "$prev" == -*[dt]* ]] && xspec="!"$xspec
|
||||||
|
|
||||||
_expand || return 0
|
_expand || return 0
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user