View Single Post

   
  #1 (permalink)  
Old 04-12-2008, 05:39 AM
Brendan Jurd
 
Posts: n/a
Default psql: present working directory

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

---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

http://www.postgresql.org/about/donate

Reply With Quote