Re: minor: ~ not resolved in psql

Francisco Olarte <folarte@peoplecall.com>

From: Francisco Olarte Sanz <folarte@peoplecall.com>
To: bas@scheffers.net, <peter_e@gmx.net>
Cc: <pgsql-bugs@postgresql.org>
Date: 2003-10-31T09:46:32Z
Lists: pgsql-bugs
On Thursday 30 October 2003 19:18, Bas Scheffers wrote:

> > This is not a bug.  If there is not file named ~ then it can't be
> > opened.
> I am not trying to open a file named ~, I am using it as part of a file
> name, ie: ~/ewap/sql/ewap.sql. (where ~=/home/bas) This is perfectly valid
> on any unix system and especialy since tab completion of \i supports it,
> so should the function that does the actual opening of the file, I would
> think...

	It's not valid in a unix system. It's an expansion performed by most shells. 
In my system (Linux, bash2):

[patxifijo:~] ls ~/2do.txt
/home/folarte/2do.txt
[patxifijo:~] ls '~/2do.txt'
ls: ~/2do.txt: No such file or directory

In fact it works with all programs:

[patxifijo:~] echo ~/2do.txt
/home/folarte/2do.txt
[patxifijo:~] echo '~/2do.txt'
~/2do.txt

F.O.S.