So I put together something that works in the majority of cases even for sub command specific flags including package completion: https://github.com/nordlow/scripts/blob/master/dub-completion.bash Feedback appreciated!