I have written an interactive function to connect to multiple mysql databases
(defun mysql-connect (name)
"Connect to a predefined MySQL connection."
(interactive
(list
(completing-read "Connect to: " sql-connection-alist
nil t nil 'pyvenv-workon-history nil nil)))
(when (not (or (equal name "")
(equal name nil)))
(mysql-connect-preset name)))
If I run M-x mysql-connect
, it will prompt user to select available options. But I want to invoke it via script.
If I run (mysql-connect 'some-choice)
it will work, but I dont want that. I just want to invoke mysql-connect
and let user to select choice.
How can I just invoke that function?