~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/shellcomplete.py

  • Committer: John Arbash Meinel
  • Date: 2006-11-06 21:00:45 UTC
  • mto: This revision was merged to the branch mainline in revision 2122.
  • Revision ID: john@arbash-meinel.com-20061106210045-b88ae833b5443145
Remove tabs from source files, and add a test to keep it that way.

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
            if longname == on:
56
56
                l = '"(--' + on + ' -' + shortname + ')"{--' + on + ',-' + shortname + '}'
57
57
                break
58
 
            else:
59
 
                l = '--' + on
 
58
            else:
 
59
                l = '--' + on
60
60
        outfile.write(l + '\n')
61
61
 
62
62
 
72
72
    cmds = []
73
73
    for cmdname, cmdclass in commands.get_all_cmds():
74
74
        cmds.append((cmdname, cmdclass))
75
 
        for alias in cmdclass.aliases:
76
 
            cmds.append((alias, cmdclass))
 
75
        for alias in cmdclass.aliases:
 
76
            cmds.append((alias, cmdclass))
77
77
    cmds.sort()
78
78
    for cmdname, cmdclass in cmds:
79
79
        if cmdclass.hidden:
80
80
            continue
81
81
        doc = getdoc(cmdclass)
82
82
        if doc is None:
83
 
            outfile.write(cmdname + '\n')
 
83
            outfile.write(cmdname + '\n')
84
84
        else:
85
 
            doclines = doc.splitlines()
86
 
            firstline = doclines[0].lower()
87
 
            outfile.write(cmdname + ':' + firstline[0:-1] + '\n')
 
85
            doclines = doc.splitlines()
 
86
            firstline = doclines[0].lower()
 
87
            outfile.write(cmdname + ':' + firstline[0:-1] + '\n')