~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/shellcomplete.py

  • Committer: Martin Pool
  • Date: 2005-09-16 03:32:44 UTC
  • mfrom: (1185.1.23)
  • mto: (1185.8.2) (974.1.91)
  • mto: This revision was merged to the branch mainline in revision 1390.
  • Revision ID: mbp@sourcefrog.net-20050916033244-18c4f4bcba663e42
- merge in many integration fixes from Robert

  * xml escaping of unprintable characters

  * 'make clean'

  * new, more consistent Branch constructors 

  * RemoteBranch tests against local farmework

  * scott's non-verbose commit fix 

This seems to break this usage though 

  bzr diff -r 1207..1208 ../bzr.robertc-integration

robertc@robertcollins.net-20050915175953-a16fdc627ce7c541

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 
18
18
    from inspect import getdoc
19
19
    import commands
20
 
    context, cmdclass = commands.get_cmd_class(cmdname)
 
20
    cmdobj = commands.get_cmd_object(cmdname)
21
21
 
22
 
    doc = getdoc(cmdclass)
 
22
    doc = getdoc(cmdobj)
23
23
    if doc == None:
24
24
        raise NotImplementedError("sorry, no detailed shellcomplete yet for %r" % cmdname)
25
25
 
26
 
    shellcomplete_on_option(cmdclass.takes_options, outfile = None)
27
 
    for aname in cmdclass.takes_args:
28
 
            outfile.write(aname + '\n')
 
26
    shellcomplete_on_option(cmdobj.takes_options, outfile = None)
 
27
    for aname in cmdobj.takes_args:
 
28
        outfile.write(aname + '\n')
29
29
 
30
30
 
31
31
def shellcomplete_on_option(options, outfile = None):