Ensure bash completion functions have valid posix names

A click application 'foo-bar' would generation a completion function
with a hyphen in the name. This is accepted by Bash interactive shells,
but fails during graphical login on a Ubuntu machine:

/usr/sbin/lightdm-session: 11: /home/rayl/.my_aliases: Syntax error: Bad function name

This leads to a login/logout loop until you login on a terminal and
fix the function name.

Signed-off-by: Ray Lehtiniemi <rayl@mail.com>