~marcoceppi/charm-tools/fix-user-cfg

« back to all changes in this revision

Viewing changes to charmtools/__init__.py

  • Committer: Marco Ceppi
  • Date: 2014-01-14 03:24:18 UTC
  • Revision ID: marco@ceppi.net-20140114032418-4tmgyith4busg34k
Make bash autocomplete list subcommands

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
        version.main()
41
41
        sys.exit(0)
42
42
 
 
43
    if sub == '--list':
 
44
        print '\n'.join(cli.subcommands(os.path.realpath(__file__)))
 
45
        sys.exit(0)
 
46
 
43
47
    sub_exec = os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])),
44
48
                            "charm-%s%s" % (sub, cli.ext()))
45
49