It would be a helpful inclusion for an installation from precompiled binaries.
This is done at https://github.com/robotology/homebrew-cask/blob/master/yarp.rb#L71 by the homebrew formula, but we should add the possibility also from custom sources installation
The package from the ubuntu ppa does not have the completion file. @traversaro please remove the macOS label, I still don't have permissions on this project.
It should be installed also with the make install command.
I have no experience in .deb packaging, but the yarp package doesn't seem to have that file, I just checked again with dpkg -L yarp. Instead, installing yarp by sources properly installs the bash completion as @drdanz pointed out. FYI I tested the setup inside this docker container, you can find there the build script.
Actually I don't think it is currently installed, I meant that we should fix the installation to install that as well.
Renamed the issue to match @drdanz comment in https://github.com/robotology/yarp/issues/1101#issuecomment-282809148 .