I have this version declared now: declare -f _filedir: _filedir () { local IFS=' ' xspec; xspec=${1:+"!*.$1"}; COMPREPLY=(${COMPREPLY[@]:-} $( compgen -f -X "$xspec" -- "$cur" ) $( compgen -d -- "$cur" )) } And it's declared in the acroread.sh... shopt -s extdebug && declare -F _filedir && shopt -u extdebug: _filedir 3 /etc/bash_completion.d/acroread.sh The interesting thing is that this bug came alive just now, while my AcroReader is installed for years. According to "_blacklist_glob='@(acroread.sh)'" in /usr/share/bash-completion/bash_completion:48 (if that file is still in use), the acroread.sh should have no effect on my system.