Re: psql: backslash fix
От | Peter Eisentraut |
---|---|
Тема | Re: psql: backslash fix |
Дата | |
Msg-id | Pine.LNX.4.30.0203111916070.690-100000@peter.localdomain обсуждение исходный текст |
Ответ на | Re: psql: backslash fix (Neil Conway <nconway@klamath.dyndns.org>) |
Список | pgsql-patches |
Neil Conway writes: > > 3. Ignore the failed backslash command and keep going. This is what it's > > doing. > > Even if we want to continue with this behavior, I think the current > implementation is confusing: psql should recall the previous buffer, set > the prompt to "=>", and allow the user to continue editing the command. > For example: > > nconway=> select foo\\bar; > Invalid command \. Try \? for help. > nconway=> select foo > ^^^^^^^^^^ recalled by psql, the user can continue > typing after this point That's an interesting idea. I'm sure readline can do this, but I haven't looked. > > Think of psql as an editor and (some of) the backslash commands as editor > > commands. When you enter a wrong command in your editor, what does it do? > > It gives me an error. For instance, in vim: > > ":set nooooexpandtab" -> "Unknown option: nooooexpandtab" > > And it returns me to my previous mode. It does _not_ recall ":set ..." Yes, but note that it doesn't completely clear the editing area or save the file or compile it. -- Peter Eisentraut peter_e@gmx.net
В списке pgsql-patches по дате отправления: