The error message appears because of the following code in
contrib/bash/bzr.simple

COMPREPLY=( $( compgen -W "$(_bzr_commands)" $cur ) )

If $cur contains "--v" compgen complains about an unknown --v option.
The fix is to insert "--" before the $cur variable.

Another issue with that code is that $cur should be quoted in case it
contains special characters that can be misinterpreted by the shell,
like spaces.

Note that this problem does not appear in bzr 2.2, because bzr.simple is
gone in that version. In bzr 2.1 Debian and Ubuntu packaging both
install bzr and bzr.simple into /etc/bash_completion.d/ and the _bzr
function definition from the latter overwrites the one from the former.
That's just a packaging problem, though.

Branch with patches to fix the -- and the quoting issues is available.

** Branch linked: lp:~wulczer/bzr/156299-bash-completion

-- 
bzr bash completion error (compgen: --: invalid option)
https://bugs.launchpad.net/bugs/156299
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to