~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/shellcomplete.py

  • Committer: John Arbash Meinel
  • Date: 2006-12-01 19:41:16 UTC
  • mfrom: (2158 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2159.
  • Revision ID: john@arbash-meinel.com-20061201194116-nvn5qhfxux5284jc
[merge] bzr.dev 2158

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')