Re: ToDo: enhanced autocomplete for object identified by prefix

Lists: pgsql-hackers
From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: ToDo: enhanced autocomplete for object identified by prefix
Date: 2010-10-04 09:58:00
Message-ID: AANLkTimE28Jfkdn1wT4bp6UOceiCePcdt6pZazx3O14r@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hello

I looked so we can enhance autocomple about: autocomplete any
datatypes for casting and autocomplete any psql varibles. This need
just add support suffix and prefix strings to joining final string.
these variables can be filled by specified handlers - like now. Some
proposed values:

prefix ::" --- data type --- suffix "
prefix :: --- data type
prefix :" -- psql variable -- suffix "
prefix :' -- psql variable -- suffix '
prefix : -- psql variable

ideas? comments?

Regards

Pavel Stehule


From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ToDo: enhanced autocomplete for object identified by prefix
Date: 2010-10-04 11:35:54
Message-ID: AANLkTinmq-o-5N_QVrQKr=JiVbrRvPG8A0jgC48fihCu@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

2010/10/4 Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>:
> Hello
>
> I looked so we can enhance autocomple about: autocomplete any
> datatypes for casting and autocomplete any psql varibles. This need
> just add support suffix and prefix strings to joining final string.
> these variables can be filled by specified handlers - like now. Some
> proposed values:
>
> prefix ::" --- data type --- suffix "
> prefix :: --- data type
> prefix :" -- psql variable -- suffix "
> prefix :' -- psql variable -- suffix '
> prefix : -- psql variable
>
> ideas? comments?
>
> Regards
>
> Pavel Stehule
>

hmm .. I looked deeper - and I was wrong - readline doesn't support
any prefix or suffix variables - so it isn't simple as I expected.
Probably we can simulate some with combination
rl_basic_word_break_characters += : and rl_completer_quote_characters
= "'\""; but we are not able to identify : and ::

Regards

Pavel