The following commit has been merged in the master branch:
commit 3e016e4679de7fda6114ee00ddcaac79f1998893
Author: Ville Skyttä <[email protected]>
Date:   Sun May 10 20:22:45 2009 +0300

    Use compgen -W in postgresql databases completion (still disabled though).

diff --git a/bash_completion b/bash_completion
index 2a0ed7f..1b2a566 100644
--- a/bash_completion
+++ b/bash_completion
@@ -4131,10 +4131,10 @@ complete -F _gdb $default gdb
 have psql && {
 _pg_databases()
 {
-       return
-       COMPREPLY=( $( psql -l 2>/dev/null | \
+       return # intentionally disabled in 7ebed6af (TODO: why?)
+       COMPREPLY=( $( compgen -W "$( psql -l 2>/dev/null | \
                        sed -e '1,/^-/d' -e '/^(/,$d' | \
-                       awk '{print $1}' | grep "^$cur" ) )
+                       awk '{print $1}' )" -- $cur ) )
 }
 
 _pg_users()

-- 
bash-completion

_______________________________________________
Bash-completion-commits mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/bash-completion-commits

Reply via email to