~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bashcomp.py

Allow different formats for tag completion.                                          
                                                                                     
The tests now use the dirstate-tags format, as does the
bzrlib.tests.test_tag module.  As "bzr tags" will print a warning about a
deprecated format for this, we should discard its error output.

That seems a good idea for production environments as well, as outdated
formats might be quite frequent, and having completion print error messages
for all of these is certainly bad style.

Show diffs side-by-side

added added

removed removed

Lines of Context:
103
103
        if [[ -z $fixedWords ]] && [[ -z $optEnums ]] && [[ $cur != -* ]]; then
104
104
                case $curOpt in
105
105
                        tag:*)
106
 
                                fixedWords="$(bzr tags | sed 's/  *[^ ]*$//')"
 
106
                                fixedWords="$(bzr tags 2>/dev/null | sed 's/  *[^ ]*$//')"
107
107
                                ;;
108
108
                esac
109
109
        elif [[ $cur == = ]] && [[ -n $optEnums ]]; then