~benoit.pierre/bzrtools/shell_improvements

« back to all changes in this revision

Viewing changes to shell.py

  • Committer: Benoît Pierre
  • Date: 2008-11-30 17:25:57 UTC
  • Revision ID: benoit.pierre@gmail.com-20081130172557-cb5zigg1hliyiaae
Add global config aliases to the list of possible commands when
completing in the shell.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
 
27
27
from bzrlib import osutils
28
28
from bzrlib.branch import Branch
29
 
from bzrlib.config import config_dir, ensure_config_dir_exists
 
29
from bzrlib.config import config_dir, ensure_config_dir_exists, GlobalConfig
30
30
from bzrlib.commands import get_cmd_object, get_all_cmds, get_alias
31
31
from bzrlib.errors import BzrError
32
32
from bzrlib.workingtree import WorkingTree
299
299
 
300
300
 
301
301
def iter_command_names(hidden=False):
 
302
    for alias in GlobalConfig().get_aliases().keys():
 
303
        yield alias
302
304
    for real_cmd_name, cmd_class in get_all_cmds():
303
305
        if not hidden and cmd_class.hidden:
304
306
            continue