[Bash-completion-commits] ./current r1178: Fix bug with gdb (and find) when an empty directory is in $PATH

David Paleino d.paleino at gmail.com
Sun Sep 7 08:35:59 UTC 2008


------------------------------------------------------------
revno: 1178
committer: David Paleino <d.paleino at gmail.com>
branch nick: current
timestamp: Sun 2008-09-07 10:35:59 +0200
message:
  Fix bug with gdb (and find) when an empty directory is in $PATH
  (thanks to Morita Sho) (Closes: #497597)
modified:
  bash_completion
  debian/changelog
-------------- next part --------------
=== modified file 'bash_completion'
--- a/bash_completion	2008-09-06 17:38:47 +0000
+++ b/bash_completion	2008-09-07 08:35:59 +0000
@@ -4094,7 +4094,7 @@
 			# 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")' \

=== modified file 'debian/changelog'
--- a/debian/changelog	2008-09-06 17:28:52 +0000
+++ b/debian/changelog	2008-09-07 08:35:59 +0000
@@ -15,9 +15,11 @@
   * 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 <d.paleino at gmail.com>  Sat, 06 Sep 2008 19:28:12 +0200
+ -- David Paleino <d.paleino at gmail.com>  Sun, 07 Sep 2008 10:32:07 +0200
 
 bash-completion (20080705) unstable; urgency=low
 



More information about the Bash-completion-commits mailing list