~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/shellcomplete.py

  • Committer: Robert Collins
  • Date: 2006-05-18 07:10:08 UTC
  • mto: (1713.1.3 integration)
  • mto: This revision was merged to the branch mainline in revision 1714.
  • Revision ID: robertc@robertcollins.net-20060518071008-96bc24f18116be36
'bzr add' is now less verbose in telling you what ignore globs were
matched by files being ignored. Instead it just tells you how many were ignored
(because you might reasonably be expecting none to be ignored). 'bzr add -v' is
unchanged and will report every ignored file. (Robert Collins).

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
        outfile.write(aname + '\n')
29
29
 
30
30
 
31
 
def shellcomplete_on_option(options, outfile = None):
32
 
    import commands
33
 
    
 
31
def shellcomplete_on_option(options, outfile=None):
 
32
    from bzrlib.option import Option
34
33
    if not options:
35
34
        return
36
 
    
37
35
    if outfile == None:
38
36
        outfile = sys.stdout
39
 
 
40
37
    for on in options:
41
 
        for shortname, longname in commands.SHORT_OPTIONS.items():
 
38
        for shortname, longname in Option.SHORT_OPTIONS.items():
42
39
            if longname == on:
43
40
                l = '"(--' + on + ' -' + shortname + ')"{--' + on + ',-' + shortname + '}'
44
41
                break