"bzr shell" completer from bzrtools now usable in ipython.
John Arbash Meinel
john at arbash-meinel.com
Wed Mar 19 21:44:09 GMT 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Ville M. Vainio wrote:
| I just added the "bzr shell" (bzrtools plugin) like command/option
| completion to IPython trunk ("bzr branch lp:ipython"). I used the code
| directly from bzrtools, just adding the ipython tab completer hook.
| So, if you use ipython as your shell, here is yet another goodie ;-)
|
| Use it by executing _ip.load('ipy_bzr') interactively, or add
| ip.load('ipy_bzr') to your ipy_user_conf.py.
|
| BTW, can anyone quickly say why bzr <tab> does not show commands from
| my plugins?
|
| The code is here:
|
| http://tinyurl.com/3728rw
|
Is that the standard bash shell complete, or the bzr shell plugin?
If it is the interactive shell, then it probably just needs to check the
registered commands.
Specifically, there is the "bzrlib.commands._builtin_commands()" and there is
the list from "bzrlib.commands.plugin_cmds".
Though if it was using "bzrlib.commands.get_all_cmds()" then it would get both.
If it is the bash completion script, it is possible that it caches the list of
commands at some point, and this was before your plugins were installed.
At least, those are my guesses.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFH4YkpJdeBCYSNAAMRAmxWAKDWBcseAKoNr2W3t+ACkYmlYcb1ngCeM4iw
C4S2dGpAbs6NGFH238ebvSE=
=B6YR
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list