At 11:04a -0400 on Wed, 26 Mar 2008, Ivan Sergio Borgonovo wrote:
> - maybe a pg[something] action may be better integrated with
> bash auto-completion without rewriting a sql parser
$ cat ~/.hypothetical_bashrc
...
complete -o default -F postgres_completion_function pg_cmd
...
$ pg_cmd<tab><tab>
CREATE ALTER VACUUM ...
$ pg_cmd create<tab><tab>
DATABASE LANGUAGE USER
Because it'd rely on a bash function installed somewhere in the
user's session, it'd be perhaps not as universal as an installed binary.
However, on a case-by-case basis, this can certainly work.
Kevin