For many years I was using tcsh, with lots of useful customizations, that were created during these years. Now I have bash on my laptop and slowly adding what I’ve got used to.

Yesterday I’ve created command line completion rules for mysql-test-run. It’s not a complete set of everything that’s possible, still it’s quite useful as it is. I need to type much less now when invoking mysql-test-run (and I invoke it quite a lot).

If you’d like to try it, paste the below in your ~/.bashrc:

3 thoughts on “bash completion for mysql-test-run

  1. I’ve never thought of it, frankly speaking. But yes, you’re right. Why not? Thanks for the idea.

    I could add it to the source tree, and then we can include it in mariadb .deb and .rpm packages.

  2. Thanks for sharing this!

    /etc/bash_completion.d is only read if you have installed, whereas the original recipe depends only on bash.

    OTOH, if you have bash-completion installed (and you normally have), you can also add those lines to ~/.bash_completion which is less intrusive.

Comments are closed.