pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedPrompts in psql
6+ messages / 5 participants
[nested] [flat]
* Prompts in psql
@ 2003-09-01 13:31 Sam Barnett-Cormack <s.barnett-cormack@lancaster.ac.uk>
2003-09-01 16:53 ` Re: Prompts in psql Bruce Momjian <pgman@candle.pha.pa.us>
2003-09-01 18:51 ` Re: Prompts in psql Renney Thomas <renneyt@yahoo.com>
2003-10-21 12:18 ` Re: Prompts in psql A.Bhuvaneswaran <bhuvanbk@yahoo.com>
0 siblings, 3 replies; 6+ messages in thread
From: Sam Barnett-Cormack @ 2003-09-01 13:31 UTC (permalink / raw)
To: pgsql-admin
Is there any way to change the prompt in the psql CLI client? In the
same way as one does with bash, or other shells.
Ideally I want:
username@host:database $
as the prompt. Anyone got any ideas/references?
--
Sam Barnett-Cormack
Software Developer | Student of Physics & Maths
UK Mirror Service (http://www.mirror.ac.uk) | Lancaster University
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Prompts in psql
2003-09-01 13:31 Prompts in psql Sam Barnett-Cormack <s.barnett-cormack@lancaster.ac.uk>
@ 2003-09-01 16:53 ` Bruce Momjian <pgman@candle.pha.pa.us>
2 siblings, 0 replies; 6+ messages in thread
From: Bruce Momjian @ 2003-09-01 16:53 UTC (permalink / raw)
To: Sam Barnett-Cormack <s.barnett-cormack@lancaster.ac.uk>; +Cc: pgsql-admin
Sam Barnett-Cormack wrote:
> Is there any way to change the prompt in the psql CLI client? In the
> same way as one does with bash, or other shells.
>
> Ideally I want:
>
> username@host:database $
>
> as the prompt. Anyone got any ideas/references?
Sure, see the psql manual page.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Prompts in psql
2003-09-01 13:31 Prompts in psql Sam Barnett-Cormack <s.barnett-cormack@lancaster.ac.uk>
@ 2003-09-01 18:51 ` Renney Thomas <renneyt@yahoo.com>
2003-09-02 09:41 ` Re: Prompts in psql Sam Barnett-Cormack <s.barnett-cormack@lancaster.ac.uk>
2 siblings, 1 reply; 6+ messages in thread
From: Renney Thomas @ 2003-09-01 18:51 UTC (permalink / raw)
To: ; +Cc: pgsql-admin
Sam Barnett-Cormack wrote:
>Is there any way to change the prompt in the psql CLI client? In the
>same way as one does with bash, or other shells.
>
>Ideally I want:
>
>username@host:database $
>
>as the prompt. Anyone got any ideas/references?
>
>
>
Put
\set PROMPT1 '%n@%m:%~%R%# '
in your .psqlrc file.
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Prompts in psql
2003-09-01 13:31 Prompts in psql Sam Barnett-Cormack <s.barnett-cormack@lancaster.ac.uk>
2003-09-01 18:51 ` Re: Prompts in psql Renney Thomas <renneyt@yahoo.com>
@ 2003-09-02 09:41 ` Sam Barnett-Cormack <s.barnett-cormack@lancaster.ac.uk>
2003-09-02 17:57 ` Re: Prompts in psql Peter Eisentraut <peter_e@gmx.net>
0 siblings, 1 reply; 6+ messages in thread
From: Sam Barnett-Cormack @ 2003-09-02 09:41 UTC (permalink / raw)
To: Renney Thomas <renneyt@yahoo.com>; +Cc: pgsql-admin
On Mon, 1 Sep 2003, Renney Thomas wrote:
> Sam Barnett-Cormack wrote:
>
> >Is there any way to change the prompt in the psql CLI client? In the
> >same way as one does with bash, or other shells.
> >
> >Ideally I want:
> >
> >username@host:database $
> >
> >as the prompt. Anyone got any ideas/references?
> >
> >
> >
>
> Put
> \set PROMPT1 '%n@%m:%~%R%# '
> in your .psqlrc file.
I've just looked in the manpage - does anyone know where psql looks for
a system-wide psqlrc?
--
Sam Barnett-Cormack
Software Developer | Student of Physics & Maths
UK Mirror Service (http://www.mirror.ac.uk) | Lancaster University
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Prompts in psql
2003-09-01 13:31 Prompts in psql Sam Barnett-Cormack <s.barnett-cormack@lancaster.ac.uk>
2003-09-01 18:51 ` Re: Prompts in psql Renney Thomas <renneyt@yahoo.com>
2003-09-02 09:41 ` Re: Prompts in psql Sam Barnett-Cormack <s.barnett-cormack@lancaster.ac.uk>
@ 2003-09-02 17:57 ` Peter Eisentraut <peter_e@gmx.net>
0 siblings, 0 replies; 6+ messages in thread
From: Peter Eisentraut @ 2003-09-02 17:57 UTC (permalink / raw)
To: Sam Barnett-Cormack <s.barnett-cormack@lancaster.ac.uk>; +Cc: pgsql-admin
Sam Barnett-Cormack writes:
> I've just looked in the manpage - does anyone know where psql looks for
> a system-wide psqlrc?
Nowhere.
--
Peter Eisentraut peter_e@gmx.net
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Prompts in psql
2003-09-01 13:31 Prompts in psql Sam Barnett-Cormack <s.barnett-cormack@lancaster.ac.uk>
@ 2003-10-21 12:18 ` A.Bhuvaneswaran <bhuvanbk@yahoo.com>
2 siblings, 0 replies; 6+ messages in thread
From: A.Bhuvaneswaran @ 2003-10-21 12:18 UTC (permalink / raw)
To: Sam Barnett-Cormack <s.barnett-cormack@lancaster.ac.uk>; +Cc: pgsql-admin
> username@host:database $
>
=> \set PROMPT1 '%n@%m:%/ $' -- Refer psql manual for details
regards,
bhuvaneswaran
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2003-10-21 12:18 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-09-01 13:31 Prompts in psql Sam Barnett-Cormack <s.barnett-cormack@lancaster.ac.uk>
2003-09-01 16:53 ` Bruce Momjian <pgman@candle.pha.pa.us>
2003-09-01 18:51 ` Renney Thomas <renneyt@yahoo.com>
2003-09-02 09:41 ` Sam Barnett-Cormack <s.barnett-cormack@lancaster.ac.uk>
2003-09-02 17:57 ` Peter Eisentraut <peter_e@gmx.net>
2003-10-21 12:18 ` A.Bhuvaneswaran <bhuvanbk@yahoo.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