ewaters / altsql-shell

An easily extensible DBI shell, perfect for a drop-in replacement to mysql-client
http://ewaters.github.com/altsql-shell
123 stars 19 forks source link

Context-sensitive tab complete #39

Open ewaters opened 12 years ago

ewaters commented 12 years ago

If you tab complete in the where clause, we should be able in most cases to know which table(s) you are selecting from and can give you a list of only the columns from those table(s)

select * from accounts where \t gives you a list of only the columns in accounts

select * from accounts as a join orders as o on \t gives you a list of the columns in accounts, prefixed with a., and the columns in orders prefixed with o.