How many of you are like me, you connect to MySQL at <*gasp*> command line, and you type 'ls' once you've selected your database, only to get the wrong result, and then remember, duh, oh yea, 'supposed to use 'show tables' instead?
Is there a way to hook mysql command such that when I type:
ls;
it does a 'show tables' for me?
MySQL Should Support the 'ls' Command
Moderator: General Moderators
Re: MySQL Should Support the 'ls' Command
You can with MySQL Proxy and some LUA scripting... http://datacharmer.blogspot.com/2007/06 ... proxy.html
The script has moved to http://forge.mysql.com/tools/tool.php?id=76
The script has moved to http://forge.mysql.com/tools/tool.php?id=76
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
Re: MySQL Should Support the 'ls' Command
You can code mysql functions in C as well... I've only added functions that were pre-written (levenshtein and the like), but you only need to do it once per server.
Re: MySQL Should Support the 'ls' Command
Yeah, but those are only functions, and you need a statement here.Kieran Huggins wrote:You can code mysql functions in C as well... I've only added functions that were pre-written (levenshtein and the like), but you only need to do it once per server.
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
Re: MySQL Should Support the 'ls' Command
Right you are!
Weirdan strikes again
Weirdan strikes again