Re: Invisible PROMPT2

Поиск
Список
Период
Сортировка
От David Fetter
Тема Re: Invisible PROMPT2
Дата
Msg-id 20191113181216.GS7444@fetter.org
обсуждение исходный текст
Ответ на Re: Invisible PROMPT2  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: Invisible PROMPT2
Список pgsql-hackers
On Wed, Nov 13, 2019 at 03:06:08PM -0300, Alvaro Herrera wrote:
> On 2019-Nov-13, David Fetter wrote:
> 
> > On Wed, Nov 13, 2019 at 09:47:01AM -0500, Tom Lane wrote:
> 
> > > > How about a circumfix directive (like the existing %[ ... %])
> > > > that replaces everything inside with whitespace, but keeps the width?
> > > 
> > > Or just define %w as meaning "whitespace of the same width as
> > > PROMPT1".  You couldn't use it *in* PROMPT1, then, but I see
> > > no use-case for that anyway.
> > 
> > +1 for doing it this way.  Would it make more sense to error out if
> > somebody tried to set that in PROMPT1, or ignore it, or...?
> 
> This seems way too specific to me.  I like the "circumfix" directive
> better, because it allows one to do more things.  I don't have any
> immediate use for it, but it doesn't seem completely far-fetched that
> there are some.
> 
> BTW the psql manual says that %[ and %] were plagiarized from tcsh, but
> that's a lie: tcsh does not contain such a feature.  Bash does, however.
> (I guess not many people read the tcsh manual.)
> 
> Neither bash nor tcsh have a feature to return whitespace of anything;
> we're in a green field here ISTM.

So something like %w[...%w] where people could put things like PROMPT1
inside?

Best,
David.
-- 
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Invisible PROMPT2
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Creating foreign key on partitioned table is too slow