psql: present working directory

From: "Brendan Jurd" <direvus(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: psql: present working directory
Date: 2006-11-20 06:09:57
Message-ID: 37ed240d0611192209m77132360yea3e0163159466c6@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dear hackers,

Is there any interest in having a backslash command to psql that
prints the current working directory? This would nicely complement
the functionality offered by \cd.

The command could be either a new command like \pwd, or simply make
this the behaviour of \cd with no argument; much the same way that \f
shows the current field separator when invoked without an argument.

Example:

postgres=> \cd /foo/bar/baz
postgres=> \cd
Working directory is "/foo/bar/baz".

Clearly it's a minor convenience feature, but I know I would use it,
and I don't see a downside. Currently \cd with no argument does
nothing at all.

Happy to provide a patch in the absence of any objections.

Regards,
BJ

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-11-20 06:12:56 Re: Statistics visibility in SERIALIZABLE transactions
Previous Message Michael Fuhr 2006-11-20 05:54:57 Statistics visibility in SERIALIZABLE transactions