%alias_magic#2036
Conversation
|
Test results for commit 4ad5a49 merged into master
Not available for testing: python2.6, python3.1 |
|
Code looks clean on first pass, but it's missing tests. There should be at least a test calling it to make an alias and then validate that the aliased function is found and is the correct one. Exercising the flags in separate tests would also be a good idea. Thanks for this, though! I hope we can wrap it up in time for 0.13. |
|
Okay, added a few tests. |
|
Test results for commit f7ef1be merged into master
Not available for testing: python2.6, python3.1 |
There was a problem hiding this comment.
Having a couple of one-line examples here would be useful. Just paste them from an interactive session.
In general, for magics we try to give examples so that people can see immediately how to use the tool, without having to figure it out from the documentation.
|
Thanks! I only noticed the need for a bit of example material (sorry I missed that on my first pass, I was about to merge and saw it now). Once that goes in (should only take a minute), I'll be happy to merge, the implementation is perfect. Great job! |
|
Tagged for 0.13, as this is basically ready. |
|
Added note above that this closes $641. |
|
I added a few |
|
Sweet, thanks! Merging now. |
%alias_magic A magic function which creates additional magic aliases. * `%alias_magic myedit edit`: `%myedit` is an alias of `%edit`. * `%alias_magic mybash bash`: `%%mybash` is an alias of `%bash`. * `%alias_magic mytimeit timeit`: `%mytimeit` is an alias of `%timeit`, and `%%mytimeit` is an alias of `%%timeit`. * `%alias_magic --cell mytimeit timeit`: Only `%%mytimeit` is an alias of `%timeit`. Closes #641.
%alias_magic A magic function which creates additional magic aliases. * `%alias_magic myedit edit`: `%myedit` is an alias of `%edit`. * `%alias_magic mybash bash`: `%%mybash` is an alias of `%bash`. * `%alias_magic mytimeit timeit`: `%mytimeit` is an alias of `%timeit`, and `%%mytimeit` is an alias of `%%timeit`. * `%alias_magic --cell mytimeit timeit`: Only `%%mytimeit` is an alias of `%timeit`. Closes ipython#641.
A magic function which creates additional magic aliases.
%alias_magic myedit edit:%myeditis an alias of%edit.%alias_magic mybash bash:%%mybashis an alias of%bash.%alias_magic mytimeit timeit:%mytimeitis an alias of%timeit, and%%mytimeitis an alias of%%timeit.%alias_magic --cell mytimeit timeit: Only%%mytimeitis an alias of%timeit.Closes #641.