diff --git a/bash_completion b/bash_completion index f192ec1a..bc670237 100644 --- a/bash_completion +++ b/bash_completion @@ -1,6 +1,6 @@ # bash_completion - some programmable completion functions for bash 2.05b # -# $Id: bash_completion,v 1.727 2004/07/04 00:51:18 ianmacd Exp $ +# $Id: bash_completion,v 1.728 2004/07/04 00:56:08 ianmacd Exp $ # # Copyright (C) Ian Macdonald # @@ -169,6 +169,15 @@ have() # [ $UNAME != Linux ] && have gsed && alias sed=gsed +# This function checks whether a given readline variable +# is `on'. +# +_rl_enabled() +{ + bind -v | grep -q '^set[ \t][ \t]*'$1'[ \t][ \t]*on' +} + + # This function performs file and directory completion. It's better than # simply using 'compgen -f', because it honours spaces in filenames. # If passed -d, it completes only on directories. If passed anything else,