"Bernd Helmle" <[EMAIL PROTECTED]> writes: > --On Donnerstag, April 03, 2008 14:36:59 +0100 Gregory Stark > <[EMAIL PROTECTED]> wrote: > >>> \o foo instead of \i foo -- check your keyboard layout >> >> The point is here you've typed a different command entirely. >> Unsurprisingly it's going to do something different. > > Uh well, you surely don't know that if you accidently hit o instead of > i....one > reason more for an alias \output and \input ;) > > To be serious, i take your point, but i'm under the impression that you simply > can't safe the user against all mistakes they are going to make ever. Your > concerns apply to every existing alias implementation as well and you aren't > safe against decisions of your distributor to add conflicting aliases to their > default bashrc as well.
I think I'm not managing to express myself clearly here. Generalizing the complaint into simply "if you typo something different happens" is losing too much information. With shell aliases if you typo "foo" into "bar" then, yes, something different will happen than what you expected. However the new behaviour will still be of the same "kind" -- that is it runs a shell command, just the wrong shell command. If there's no command by that name you get an error not some unrelated shell functionality. In the proposed alias syntax if you typo \cold into \coldd it will print a mysterious error about trying to connect to a database or if you typo \old into \oldd it will write out a file and stop printing query output. The user might not even realize that \c and \o are commands since they think they're running commands \colld and \oldd. I think you have to find a syntax where the current commands continue to mean exactly what they always meant and where typos can't result in an entirely different kind of behaviour. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's 24x7 Postgres support! -- Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-patches