Show More
@@ -717,14 +717,13 b' def _format_lineno(session, line):' | |||||
717 | def magic_history(self, parameter_s = ''): |
|
717 | def magic_history(self, parameter_s = ''): | |
718 | """Print input history (_i<n> variables), with most recent last. |
|
718 | """Print input history (_i<n> variables), with most recent last. | |
719 |
|
719 | |||
720 | %history -> print at most 40 inputs (some may be multi-line)\\ |
|
720 | %history [-o -p -t -n] [-f filename] [range | -g pattern | -l number] | |
721 | %history n -> print at most n inputs\\ |
|
|||
722 | %history n1 n2 -> print inputs between n1 and n2 (n2 not included)\\ |
|
|||
723 |
|
721 | |||
724 | By default, input history is printed without line numbers so it can be |
|
722 | By default, input history is printed without line numbers so it can be | |
725 | directly pasted into an editor. Use -n to show them. |
|
723 | directly pasted into an editor. Use -n to show them. | |
726 |
|
724 | |||
727 | Ranges of history can be indicated using the syntax: |
|
725 | By default, all input history from the current session is displayed. | |
|
726 | Ranges of history can be indicated using the syntax: | |||
728 | 4 : Line 4, current session |
|
727 | 4 : Line 4, current session | |
729 | 4-6 : Lines 4-6, current session |
|
728 | 4-6 : Lines 4-6, current session | |
730 | 243/1-5: Lines 1-5, session 243 |
|
729 | 243/1-5: Lines 1-5, session 243 | |
@@ -772,9 +771,10 b" def magic_history(self, parameter_s = ''):" | |||||
772 | -------- |
|
771 | -------- | |
773 | :: |
|
772 | :: | |
774 |
|
773 | |||
775 |
In [6]: %hist -n 4 |
|
774 | In [6]: %hist -n 4-6 | |
776 | 4:a = 12 |
|
775 | 4:a = 12 | |
777 | 5:print a**2 |
|
776 | 5:print a**2 | |
|
777 | 6:%hist -n 4-6 | |||
778 |
|
778 | |||
779 | """ |
|
779 | """ | |
780 |
|
780 |
General Comments 0
You need to be logged in to leave comments.
Login now