Re: [HACKERS] psql \e broken again

2004-11-16 Thread Zeugswetter Andreas DAZ SD
>> I like Kevin Brown's suggestion of writing out a temporary .txt file and >> 'executing' it. It will follow the principle of least suprise for Windows >> users. > > Note that the current default behavior (assuming you've not set EDITOR) > is "vi foo.txt" which is quite unlikely to be helpful to a

Re: [HACKERS] psql \e broken again

2004-11-16 Thread Tom Lane
"Bort, Paul" <[EMAIL PROTECTED]> writes: > I like Kevin Brown's suggestion of writing out a temporary .txt file and > 'executing' it. It will follow the principle of least suprise for Windows > users. Note that the current default behavior (assuming you've not set EDITOR) is "vi foo.txt" which is

Re: [HACKERS] psql \e broken again

2004-11-16 Thread Bort, Paul
Title: RE: [HACKERS] psql \e broken again From: Zeugswetter Andreas DAZ SD [mailto:[EMAIL PROTECTED]] > > I am not sure the test is valid, since %EDITOR% was used on > the command line, > which does it's own magic on quotes. Is there a command that > would use the >

Re: [HACKERS] psql \e broken again

2004-11-16 Thread Zeugswetter Andreas DAZ SD
>> So I thought I'd try a few scenarios, since I have it installed: >> [ none of which work ] >> So to answer your question, at least in part, there is no current good >> behavior to emulate. At least on this version of CVS: > I think this is fairly graphic proof that (1) a straight port without

Re: [HACKERS] psql \e broken again

2004-11-16 Thread Kevin Brown
Tom Lane wrote: > "Magnus Hagander" <[EMAIL PROTECTED]> writes: > >> Agreed, no quotes on Unix. I'm just wondering what to do > >> on Windows. > > > I don't think I've seen a single windows program that uses the EDITOR > > variable. There are some ported unix tools, but that's it. Native > > win

Re: [HACKERS] psql \e broken again

2004-11-15 Thread Tom Lane
"Bort, Paul" <[EMAIL PROTECTED]> writes: > The one that I see most often ( and use here ) is CVSGUI ( > http://www.wincvs.org/ ), which includes a CVS command-line client despite > the name. ( The command-line CVS might be from CVSNT, > http://www.cvsnt.com/cvspro/ ). > So I thought I'd try a few

Re: [HACKERS] psql \e broken again

2004-11-15 Thread Bort, Paul
Title: RE: [HACKERS] psql \e broken again From: Peter Eisentraut [mailto:[EMAIL PROTECTED]] > > Is there a Windows port of the command-line cvs tool?  That > would be a > good thing to compare with. > The one that I see most often ( and use here ) is CVSGUI ( http:/

Re: [HACKERS] psql \e broken again

2004-11-15 Thread Andreas Pflug
Peter Eisentraut wrote: Magnus Hagander wrote: I don't think I've seen a single windows program that uses the EDITOR variable. There are some ported unix tools, but that's it. Native windows program will have a per-program setting for this. The system default is picked based on file extension. So I

Re: [HACKERS] psql \e broken again

2004-11-15 Thread Peter Eisentraut
Magnus Hagander wrote: > I don't think I've seen a single windows program that uses the EDITOR > variable. There are some ported unix tools, but that's it. Native > windows program will have a per-program setting for this. The system > default is picked based on file extension. So I doubt it will b

Re: [HACKERS] psql \e broken again

2004-11-15 Thread Magnus Hagander
> > We could maybe compromise with (again, for Windows only) a > policy like > > "double-quote unless the value already contains at least one > > double-quote". This should work conveniently for everybody > except the > > user who wants EDITOR='gvim.exe -y' on Windows; he'll have > to add so

Re: [HACKERS] psql \e broken again

2004-11-15 Thread Magnus Hagander
> >> Agreed, no quotes on Unix. I'm just wondering what to do > on Windows. > > > I don't think I've seen a single windows program that uses > the EDITOR > > variable. There are some ported unix tools, but that's it. Native > > windows program will have a per-program setting for this. > The

Re: [HACKERS] psql \e broken again

2004-11-15 Thread Tom Lane
"Magnus Hagander" <[EMAIL PROTECTED]> writes: >> Agreed, no quotes on Unix. I'm just wondering what to do >> on Windows. > I don't think I've seen a single windows program that uses the EDITOR > variable. There are some ported unix tools, but that's it. Native > windows program will have a per-p

Re: [HACKERS] psql \e broken again

2004-11-15 Thread Magnus Hagander
> >> Agreed, no quotes on Unix. I'm just wondering what to do > on Windows. > > > I would require the user to add quotes around his > executable if it has > > spaces. > > > set EDITOR="C:/Program Files/vim/vim63/gvim.exe" -y > > I think this policy is OK for the Mac OS X case, but I am > wo

Re: [HACKERS] psql \e broken again

2004-11-15 Thread Zeugswetter Andreas DAZ SD
> We could maybe compromise with (again, for Windows only) a policy like > "double-quote unless the value already contains at least one > double-quote". This should work conveniently for everybody except the > user who wants EDITOR='gvim.exe -y' on Windows; he'll have to add > some useless-lookin

Re: [HACKERS] psql \e broken again

2004-11-15 Thread Tom Lane
"Zeugswetter Andreas DAZ SD" <[EMAIL PROTECTED]> writes: >> Agreed, no quotes on Unix. I'm just wondering what to do on Windows. > I would require the user to add quotes around his executable if it has > spaces. > set EDITOR="C:/Program Files/vim/vim63/gvim.exe" -y I think this policy is OK for

Re: [HACKERS] psql \e broken again

2004-11-15 Thread Travis P
On Sun, Nov 14, 2004 at 10:14:06PM -0500, Bruce Momjian wrote: John Hansen wrote: 1. Quote only on Windows. 2. Expect user to put quotes in the EDITOR value if it contains a space-containing path. As far I I'm aware, the options on windows are very much like those on unix: "path containing spaces"

Re: [HACKERS] psql \e broken again

2004-11-15 Thread Zeugswetter Andreas DAZ SD
>> The EDITOR variable seems to have a fairly standard meaning on Unix >> systems. I've been using that EDITOR value for years without problems, >> only when I use psql's \e once in a while it breaks. I don't think we >> should deviate from what seems to be a standard practice. > > Agreed, no

Re: [HACKERS] psql \e broken again

2004-11-14 Thread joseph speigle
hi, As for mac os x this is on darwin mac os (it's mac something) I ran a find command with a space in it. mechatronics:~ joe$ find . -name '* *' ./backups/dscpadmin/scriptsMay19/dscp/validate/List of Cancers.doc ./backups/pain/PAINjune/validate/List of Cancers.doc ./backups/untarhere/test/List o

Re: [HACKERS] psql \e broken again

2004-11-14 Thread Bruce Momjian
John Hansen wrote: > > > 1. Quote only on Windows. > > > > > > 2. Expect user to put quotes in the EDITOR value if it contains a > > > space-containing path. > > > As far I I'm aware, the options on windows are very much like those on > unix: > > "path containing spaces" or > path\ containing\

Re: [HACKERS] psql \e broken again

2004-11-14 Thread John Hansen
> > 1. Quote only on Windows. > > > > 2. Expect user to put quotes in the EDITOR value if it contains a > > space-containing path. As far I I'm aware, the options on windows are very much like those on unix: "path containing spaces" or path\ containing\ spaces Kind Regards John Hansen --

Re: [HACKERS] psql \e broken again

2004-11-14 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > The EDITOR variable seems to have a fairly standard meaning on Unix > systems. I've been using that EDITOR value for years without problems, > only when I use psql's \e once in a while it breaks. I don't think we > should deviate from what seems t

Re: [HACKERS] psql \e broken again

2004-11-14 Thread Peter Eisentraut
Tom Lane wrote: > I think the rationale was to allow paths containing spaces, which is > a pretty serious problem on Windows. Seems like we have two basic > options: > > 1. Quote only on Windows. > > 2. Expect user to put quotes in the EDITOR value if it contains a > space-containing path. The ED

Re: [HACKERS] psql \e broken again

2004-11-14 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > A remember specifically that I somewhat recently fixed psql to accept > editors with arguments, say EDITOR="pico -t". This was apparently > broken again during some Windows-related reshuffling. It now takes the > editor as one quoted string rather

[HACKERS] psql \e broken again

2004-11-14 Thread Peter Eisentraut
A remember specifically that I somewhat recently fixed psql to accept editors with arguments, say EDITOR="pico -t". This was apparently broken again during some Windows-related reshuffling. It now takes the editor as one quoted string rather than possibly several shell tokens. Could this ple