diff --git a/bash_completion b/bash_completion index 44ca4a35..d4928f96 100644 --- a/bash_completion +++ b/bash_completion @@ -4094,7 +4094,7 @@ _gdb() # functions and aliases. Thus we need to retrieve the program # names manually. IFS=":" - local path_array=( $(echo "$PATH") ) + local path_array=( $(echo "$PATH" | sed 's/::\+/:/g;s/^:\|:$//g') ) IFS=$'\n' COMPREPLY=( $( compgen -d -W '$(find "${path_array[@]}" . \ -mindepth 1 -maxdepth 1 -not -type d -executable -printf "%f\\n")' \ diff --git a/debian/changelog b/debian/changelog index a237d346..b8a5859e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,9 +15,11 @@ bash-completion (200809xx) UNRELEASED; urgency=low * Bogus completion when mounting subdirs fixed (Closes: #322238) * Fix `apt-cache showsrc` completing only on source package names (Closes: #361535) + * Fix bug with gdb (and find) when an empty directory is in $PATH + (thanks to Morita Sho) (Closes: #497597) * debian/links fixed (Closes: #494292) - -- David Paleino Sat, 06 Sep 2008 19:28:12 +0200 + -- David Paleino Sun, 07 Sep 2008 10:32:07 +0200 bash-completion (20080705) unstable; urgency=low