sqlline
sqlline copied to clipboard
added command for auto-completing connection names and fixed bug in c…
added command for auto-completing connection names and fixed bug in command line completion
Please check the attached changes, if something like that is wanted. If you give me positive feedback, I will start fixing checkstyle.
Thanks for your PR. Could you please describe an issue you are trying to solve and add tests highlighting this issue?
Sure. First the descriptions (Tests I can do tomorrow)
-
Simple problem when configuring a new application config the Command Completion is not updated at all (SqlLine.java) The member variable "sqlLineCommandCompleter" is final and on AppConfig reset it is not recreated. This needs to be done, because the "sqlLineCommandCompleter" is initialized in the constructor before customization happens.
-
We are using SQL-Line with preconfigured connection yml files. On start we set the filename via custom application. Now we wanted a way to connect to a database server without a) memorizing the configured connections and b) with a command without parameters. (Allthough b is just lazyness on our part). I've added the possibility of tab-completion on configured connection names with a new "special" command which you can also tab-complete, so you don't have to write "connect -c"