Skip to content

Commit

Permalink
Merge pull request #1483 from ahmadia/history_doc_fix
Browse files Browse the repository at this point in the history
updated magic_history docstring
  • Loading branch information
takluyver committed Mar 10, 2012
2 parents 0f5060e + 14f1ff7 commit 2f66362
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions IPython/core/history.py
Original file line number Diff line number Diff line change
Expand Up @@ -717,14 +717,13 @@ def _format_lineno(session, line):
def magic_history(self, parameter_s = ''):
"""Print input history (_i<n> variables), with most recent last.
%history -> print at most 40 inputs (some may be multi-line)\\
%history n -> print at most n inputs\\
%history n1 n2 -> print inputs between n1 and n2 (n2 not included)\\
%history [-o -p -t -n] [-f filename] [range | -g pattern | -l number]
By default, input history is printed without line numbers so it can be
directly pasted into an editor. Use -n to show them.
Ranges of history can be indicated using the syntax:
By default, all input history from the current session is displayed.
Ranges of history can be indicated using the syntax:
4 : Line 4, current session
4-6 : Lines 4-6, current session
243/1-5: Lines 1-5, session 243
Expand Down Expand Up @@ -772,9 +771,10 @@ def magic_history(self, parameter_s = ''):
--------
::
In [6]: %hist -n 4 6
In [6]: %hist -n 4-6
4:a = 12
5:print a**2
6:%hist -n 4-6
"""

Expand Down

0 comments on commit 2f66362

Please sign in to comment.