Re: psql: present working directory

From: Jerry Sievers <jerry(at)jerrysievers(dot)com>
To: "Brendan Jurd" <direvus(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: psql: present working directory
Date: 2006-11-20 13:24:48
Message-ID: m3r6vyw8rj.fsf@homie.jerrysievers.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Brendan Jurd" <direvus(at)gmail(dot)com> writes:

> 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.

We have this through subshell invocation

\!pwd

HTH

> 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
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: You can help support the PostgreSQL project by donating at
>
> http://www.postgresql.org/about/donate
>

--
-------------------------------------------------------------------------------
Jerry Sievers 305 854-3001 (home) Production Database Administrator
305 321-1144 (mobil WWW E-Commerce Consultant

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Teodor Sigaev 2006-11-20 14:07:57 Re: Tsearch + polish ispell + polish locale
Previous Message arkadiusz.staron 2006-11-20 10:19:34 Tsearch + polish ispell + polish locale