Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
psql: Tell psql to not load .psqlrc as it may change output format (A…
…lioth: #314636)
  • Loading branch information
GArik committed Jun 2, 2014
1 parent 732906b commit 9186add
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions completions/psql
Expand Up @@ -4,14 +4,14 @@ _pg_databases()
{
# -w was introduced in 8.4, https://launchpad.net/bugs/164772
# "Access privileges" in output may contain linefeeds, hence the NF > 1
COMPREPLY=( $( compgen -W "$( psql -AtqwlF $'\t' 2>/dev/null | \
COMPREPLY=( $( compgen -W "$( psql -XAtqwlF $'\t' 2>/dev/null | \
awk 'NF > 1 { print $1 }' )" -- "$cur" ) )
}

_pg_users()
{
# -w was introduced in 8.4, https://launchpad.net/bugs/164772
COMPREPLY=( $( compgen -W "$( psql -Atqwc 'select usename from pg_user' \
COMPREPLY=( $( compgen -W "$( psql -XAtqwc 'select usename from pg_user' \
template1 2>/dev/null )" -- "$cur" ) )
[[ ${#COMPREPLY[@]} -eq 0 ]] && COMPREPLY=( $( compgen -u -- "$cur" ) )
}
Expand Down

0 comments on commit 9186add

Please sign in to comment.