I’m the maintainer of the lxi-tools snap and I simply can’t get my bash completion script working for the lxi command which is an automatic alias:
I assume it should work because I’m configuring it the exact same way that I do for the tio snap for which the bash completion script works perfectly fine:
The only real differences between lxi-tools and tio is that one contains multiple commands (lxi and lxi-gui) while tio does not. Also, tio does not use automatic aliases.
Could it be that bash completion support is broken for automatic aliases?
The key thing with aliases that’s easy to miss is that the bash completer receives the unaliased full name of the command. So even if you alias foo.bar to bar, the bash completer still gets foo.bar no matter what the user types.
This is because aliases can be ignored, added and removed by users, and tab completion should carry on working