pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Adding terminal title support for psqlrc
6+ messages / 3 participants
[nested] [flat]

* Adding terminal title support for psqlrc
@ 2018-08-01 08:52 ik <idokan@gmail.com>
  2018-08-01 13:29 ` Re: Adding terminal title support for psqlrc Adrian Klaver <adrian.klaver@aklaver.com>
  2018-08-01 13:47 ` Re: Adding terminal title support for psqlrc Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 2 replies; 6+ messages in thread

From: ik @ 2018-08-01 08:52 UTC (permalink / raw)
  To: pgsql-general

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

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Adding terminal title support for psqlrc
  2018-08-01 08:52 Adding terminal title support for psqlrc ik <idokan@gmail.com>
@ 2018-08-01 13:29 ` Adrian Klaver <adrian.klaver@aklaver.com>
  1 sibling, 0 replies; 6+ messages in thread

From: Adrian Klaver @ 2018-08-01 13:29 UTC (permalink / raw)
  To: ik <idokan@gmail.com>; pgsql-general

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




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Adding terminal title support for psqlrc
  2018-08-01 08:52 Adding terminal title support for psqlrc ik <idokan@gmail.com>
@ 2018-08-01 13:47 ` Tom Lane <tgl@sss.pgh.pa.us>
  2018-08-01 17:55   ` Re: Adding terminal title support for psqlrc ik <idokan@gmail.com>
  1 sibling, 1 reply; 6+ messages in thread

From: Tom Lane @ 2018-08-01 13:47 UTC (permalink / raw)
  To: ik <idokan@gmail.com>; +Cc: pgsql-general

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




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Adding terminal title support for psqlrc
  2018-08-01 08:52 Adding terminal title support for psqlrc ik <idokan@gmail.com>
  2018-08-01 13:47 ` Re: Adding terminal title support for psqlrc Tom Lane <tgl@sss.pgh.pa.us>
@ 2018-08-01 17:55   ` ik <idokan@gmail.com>
  2018-08-01 18:15     ` Re: Adding terminal title support for psqlrc Adrian Klaver <adrian.klaver@aklaver.com>
  0 siblings, 1 reply; 6+ messages in thread

From: ik @ 2018-08-01 17:55 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-general

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
>

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Adding terminal title support for psqlrc
  2018-08-01 08:52 Adding terminal title support for psqlrc ik <idokan@gmail.com>
  2018-08-01 13:47 ` Re: Adding terminal title support for psqlrc Tom Lane <tgl@sss.pgh.pa.us>
  2018-08-01 17:55   ` Re: Adding terminal title support for psqlrc ik <idokan@gmail.com>
@ 2018-08-01 18:15     ` Adrian Klaver <adrian.klaver@aklaver.com>
  2018-08-02 09:32       ` Re: Adding terminal title support for psqlrc ik <idokan@gmail.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Adrian Klaver @ 2018-08-01 18:15 UTC (permalink / raw)
  To: ik <idokan@gmail.com>; Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-general

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




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Adding terminal title support for psqlrc
  2018-08-01 08:52 Adding terminal title support for psqlrc ik <idokan@gmail.com>
  2018-08-01 13:47 ` Re: Adding terminal title support for psqlrc Tom Lane <tgl@sss.pgh.pa.us>
  2018-08-01 17:55   ` Re: Adding terminal title support for psqlrc ik <idokan@gmail.com>
  2018-08-01 18:15     ` Re: Adding terminal title support for psqlrc Adrian Klaver <adrian.klaver@aklaver.com>
@ 2018-08-02 09:32       ` ik <idokan@gmail.com>
  0 siblings, 0 replies; 6+ messages in thread

From: ik @ 2018-08-02 09:32 UTC (permalink / raw)
  To: Adrian Klaver <adrian.klaver@aklaver.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-general

Thank you, it works :)

https://github.com/ik5/dotfiles/blob/master/psqlrc

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
>

^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2018-08-02 09:32 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-08-01 08:52 Adding terminal title support for psqlrc ik <idokan@gmail.com>
2018-08-01 13:29 ` Adrian Klaver <adrian.klaver@aklaver.com>
2018-08-01 13:47 ` Tom Lane <tgl@sss.pgh.pa.us>
2018-08-01 17:55   ` ik <idokan@gmail.com>
2018-08-01 18:15     ` Adrian Klaver <adrian.klaver@aklaver.com>
2018-08-02 09:32       ` ik <idokan@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox