Show More
@@ -1,3 +1,14 b'' | |||||
|
1 | """ Extension for bzr command tab completer. Supports comlpeting commands and options | |||
|
2 | ||||
|
3 | Unlike the core IPython, you should note that this extension is under GPL, not BSD. | |||
|
4 | ||||
|
5 | Based on "shell" bzr plugin by Aaron Bentley, license is below. The IPython additions | |||
|
6 | are at the bottom of the file, the rest is left untouched. | |||
|
7 | ||||
|
8 | Must be loaded with ip.load('ipy_bzr') | |||
|
9 | ||||
|
10 | """ | |||
|
11 | a | |||
1 | # Copyright (C) 2004, 2005 Aaron Bentley |
|
12 | # Copyright (C) 2004, 2005 Aaron Bentley | |
2 | # <aaron@aaronbentley.com> |
|
13 | # <aaron@aaronbentley.com> | |
3 | # |
|
14 | # | |
@@ -29,7 +40,7 b' from bzrlib.config import config_dir, ensure_config_dir_exists' | |||||
29 | from bzrlib.commands import get_cmd_object, get_all_cmds, get_alias |
|
40 | from bzrlib.commands import get_cmd_object, get_all_cmds, get_alias | |
30 | from bzrlib.errors import BzrError |
|
41 | from bzrlib.errors import BzrError | |
31 | from bzrlib.workingtree import WorkingTree |
|
42 | from bzrlib.workingtree import WorkingTree | |
32 |
|
43 | import bzrlib.plugin | ||
33 |
|
44 | |||
34 |
|
45 | |||
35 | SHELL_BLACKLIST = set(['rm', 'ls']) |
|
46 | SHELL_BLACKLIST = set(['rm', 'ls']) | |
@@ -328,7 +339,5 b' def init_ipython(ip):' | |||||
328 | cmd = None |
|
339 | cmd = None | |
329 |
|
340 | |||
330 | return CompletionContext(ev.symbol, command = cmd).get_completions() |
|
341 | return CompletionContext(ev.symbol, command = cmd).get_completions() | |
|
342 | bzrlib.plugin.load_plugins() | |||
331 | ip.set_hook('complete_command', bzr_completer, str_key = 'bzr') |
|
343 | ip.set_hook('complete_command', bzr_completer, str_key = 'bzr') | |
332 |
|
||||
333 |
|
||||
334 |
|
General Comments 0
You need to be logged in to leave comments.
Login now