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

This commit is contained in:
Ville Skyttä 2009-05-10 20:22:45 +03:00
parent 7d19d2a106
commit 3e016e4679

View File

@ -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()