Re: BUG #4040: psql should provide option to not prompt for password

Поиск
Список
Период
Сортировка
От Mika Fischer
Тема Re: BUG #4040: psql should provide option to not prompt for password
Дата
Msg-id 20080317150045.GB17432@msgid.zoopnet.de
обсуждение исходный текст
Ответ на Re: BUG #4040: psql should provide option to not prompt for password  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-bugs
* Alvaro Herrera <alvherre@commandprompt.com> [2008-03-17 15:43]:
> Hmm, why do you need to connect to a database?  Some time ago I came up
> with this:
>
> _postgres()
> {
>         local cur;
>         COMPREPLY=()
>         cur=${COMP_WORDS[COMP_CWORD]}
>         prev=${COMP_WORDS[COMP_CWORD-1]}
>         if [ "$prev" == "-c" ]; then
>                 COMPREPLY=($(compgen -S= -onospace -W '`command postgres --describe-config | cut -d"    " -f1`' --
$cur));
>                 return 0
>         fi
>         COMPREPLY=($(compgen -W '-A -B -c -d -D -e -E -F -N -o -P -s -S -f -i -O -t -W --describe-config --help
--version'-- $cur)) 
>         return 0
> }
> complete -F _postgres postgres postmaster
>
> What else do you need?

The idea was to do completion for psql, in particular of usernames and
databases. See my other mail for details.

Regards,
 Mika

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Mika Fischer
Дата:
Сообщение: Re: BUG #4040: psql should provide option to not prompt for password
Следующее
От: Mika Fischer
Дата:
Сообщение: Re: BUG #4040: psql should provide option to not prompt for password