Show More
@@ -2397,9 +2397,11 b' module, now part of the standard Python library.' | |||||
2397 | Input caching system |
|
2397 | Input caching system | |
2398 | -------------------- |
|
2398 | -------------------- | |
2399 |
|
2399 | |||
2400 |
IPython offers numbered prompts (In/Out) with input and output caching |
|
2400 | IPython offers numbered prompts (In/Out) with input and output caching | |
2401 | All input is saved and can be retrieved as variables (besides the usual |
|
2401 | (also referred to as 'input history'). All input is saved and can be | |
2402 | arrow key recall). |
|
2402 | retrieved as variables (besides the usual arrow key recall), in | |
|
2403 | addition to the %rep magic command that brings a history entry | |||
|
2404 | up for editing on the next command line. | |||
2403 |
|
2405 | |||
2404 | The following GLOBAL variables always exist (so don't overwrite them!): |
|
2406 | The following GLOBAL variables always exist (so don't overwrite them!): | |
2405 | _i: stores previous input. _ii: next previous. _iii: next-next previous. |
|
2407 | _i: stores previous input. _ii: next previous. _iii: next-next previous. | |
@@ -2432,6 +2434,16 b' sec. 6.2 <#sec:magic> for more details on the macro system.' | |||||
2432 | A history function %hist allows you to see any part of your input |
|
2434 | A history function %hist allows you to see any part of your input | |
2433 | history by printing a range of the _i variables. |
|
2435 | history by printing a range of the _i variables. | |
2434 |
|
2436 | |||
|
2437 | You can also search ('grep') through your history by typing | |||
|
2438 | '%hist -g somestring'. This also searches through the so called 'shadow history', | |||
|
2439 | which remembers all the commands (apart from multiline code blocks) | |||
|
2440 | you have ever entered. Handy for searching for svn/bzr URL's, IP adrresses | |||
|
2441 | etc. You can bring shadow history entries listed by '%hist -g' up for editing | |||
|
2442 | (or re-execution by just pressing ENTER) with %rep command. Shadow history | |||
|
2443 | entries are not available as _iNUMBER variables, and they are identified by | |||
|
2444 | the '0' prefix in %hist -g output. That is, history entry 12 is a normal | |||
|
2445 | history entry, but 0231 is a shadow history entry. | |||
|
2446 | ||||
2435 | .. _output_caching: |
|
2447 | .. _output_caching: | |
2436 |
|
2448 | |||
2437 | Output caching system |
|
2449 | Output caching system | |
@@ -2475,7 +2487,7 b' Directory history' | |||||
2475 |
|
2487 | |||
2476 | Your history of visited directories is kept in the global list _dh, and |
|
2488 | Your history of visited directories is kept in the global list _dh, and | |
2477 | the magic %cd command can be used to go to any entry in that list. The |
|
2489 | the magic %cd command can be used to go to any entry in that list. The | |
2478 |
%dhist command allows you to view this history. |
|
2490 | %dhist command allows you to view this history. Do ``cd -<TAB`` to | |
2479 | conventiently view the directory history. |
|
2491 | conventiently view the directory history. | |
2480 |
|
2492 | |||
2481 |
|
2493 |
General Comments 0
You need to be logged in to leave comments.
Login now