Shamelessly copy shell completion scripts from Hub
Rewrite because previous implementation was overwriting options