- don't source files in $BASH_COMPLETION_DIR if they are vi swap files,
Debian back-ups, Emacs temp files, back-ups, etc.
This commit is contained in:
parent
74296a3fd7
commit
36e49c9c1a
@ -1,6 +1,6 @@
|
||||
# bash_completion - some programmable completion functions for bash 2.05b
|
||||
#
|
||||
# $Id: bash_completion,v 1.470 2002/12/04 07:41:21 ianmacd Exp $
|
||||
# $Id: bash_completion,v 1.471 2002/12/05 02:18:17 ianmacd Exp $
|
||||
#
|
||||
# Copyright (C) Ian Macdonald <ian@caliban.org>
|
||||
#
|
||||
@ -4103,7 +4103,8 @@ unset list[@]
|
||||
if [ -d $BASH_COMPLETION_DIR -a -r $BASH_COMPLETION_DIR -a \
|
||||
-x $BASH_COMPLETION_DIR ]; then
|
||||
for i in $BASH_COMPLETION_DIR/*; do
|
||||
[[ ${i##*/} != @(*~|*.bak| ]] && [ -f $i -a -r $i ] && . $i
|
||||
[[ ${i##*/} != @(*~|*.bak|*.swp|\#*\#|*.dpkg*) ]] \
|
||||
&& [ -f $i -a -r $i ] && . $i
|
||||
done
|
||||
fi
|
||||
unset i
|
||||
|
Loading…
x
Reference in New Issue
Block a user