Re: Adding terminal title support for psqlrc

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: ik <idokan(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Adding terminal title support for psqlrc
Date: 2018-08-01 13:47:29
Message-ID: 26302.1533131249@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

ik <idokan(at)gmail(dot)com> writes:
> Is there a way to add terminal title information for psqlrc that cn display
> what schema I am, operation that is execute and stuff like that?

Most terminal programs recognize escape sequences to set the window
title. So you could set values for PROMPTn that cause updates in
the title. There's an example in

https://www.postgresql.org/docs/devel/static/app-psql.html#APP-PSQL-PROMPTING

although it's just talking about a color change.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2018-08-01 14:08:27 Re: Template0 datfrozenxid age is 160million and progressing
Previous Message Adrian Klaver 2018-08-01 13:29:37 Re: Adding terminal title support for psqlrc