Thread: Adding terminal title support for psqlrc
Hello,
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?Thank you
On 08/01/2018 01:52 AM, ik wrote: > Hello, > > 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? Are you referring to the title bar for something like an Konsole? If so then no. If not then what title are you referring to? > > Thank you > -- Adrian Klaver adrian.klaver@aklaver.com
ik <idokan@gmail.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
hi,
Thank you, it does not effect the terminal title.
As Adrian answered me, it is not supported :/
On Wed, Aug 1, 2018 at 4:47 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
ik <idokan@gmail.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
On 08/01/2018 10:55 AM, ik wrote: > hi, > > Thank you, it does not effect the terminal title. > > As Adrian answered me, it is not supported :/ I was wrong: https://petereisentraut.blogspot.com/2009/09/how-to-set-xterm-titles-in-psql.html To get this to work in Konsole I had to edit the profile to have Tab title format use %w (Window title set by shell). > > > > On Wed, Aug 1, 2018 at 4:47 PM, Tom Lane <tgl@sss.pgh.pa.us > <mailto:tgl@sss.pgh.pa.us>> wrote: > > ik <idokan@gmail.com <mailto:idokan@gmail.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 > <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 > > -- Adrian Klaver adrian.klaver@aklaver.com
On Wed, Aug 1, 2018 at 9:15 PM, Adrian Klaver <adrian.klaver@aklaver.com> wrote:
On 08/01/2018 10:55 AM, ik wrote:hi,
Thank you, it does not effect the terminal title.
As Adrian answered me, it is not supported :/
I was wrong:
https://petereisentraut.blogspot.com/2009/09/how-to-set- xterm-titles-in-psql.html
To get this to work in Konsole I had to edit the profile to have Tab title format use %w (Window title set by shell).
On Wed, Aug 1, 2018 at 4:47 PM, Tom Lane <tgl@sss.pgh.pa.us <mailto:tgl@sss.pgh.pa.us>> wrote:
ik <idokan@gmail.com <mailto:idokan@gmail.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
<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
--
Adrian Klaver
adrian.klaver@aklaver.com